Tracking Agent docs
How to review a Tracking Agent proposal
Review a tracking proposal on the Datalyze review page or with comments on the pull request: approve, edit or reject each item, then sign off. Reviewers sign in with GitHub only and need no Datalyze account. Whichever way you review, each decision is a /datalyze comment posted from your own GitHub account.
Who can review and sign off tracking changes?
The people in reviewers in .datalyze/config.yaml, as GitHub logins or teams written @org/team. The runner reads that file from the pull request's base branch, or from the default branch when the base has none, never from the pull request itself, so a change to reviewers counts only once it merges. It checks the GitHub account that posted each comment, never a commit's author field.
For team entries, your GitHub App needs read access to your organisation's members, which setup asks for when the repo belongs to an organisation. Set allow_author_approval: false to stop a pull request's author deciding on their own tracking: approving, rejecting, dropping, answering, signing off or skipping. Rejecting every item also turns the check green, so it counts as a decision too.
How do I find pull requests waiting for my review?
The review inbox lists open pull requests labelled datalyze in your own repos and in every organisation you belong to. The runner adds that label the first time a pull request needs a person, and its summary comment links straight to that pull request's review page. You can also paste a pull request link.
Signing in asks GitHub for the repo and read:org scopes, so the page can read and write the proposal file and see your organisations. The token passes once through Datalyze's exchange step on its way back to your browser, and isn't stored there. After that it stays in your browser tab and goes only to api.github.com. The review, setup and sign-in pages load no analytics and no third-party scripts.
What does each proposal item show?
- What changes and why, in one sentence.
- The question the change answers.
- The evidence: the code it's based on, and for existing items the data and the query behind it.
- Whether it's breaking, and how confident the agent is.
- The fields you can edit, and a note box for instructions the agent must follow.
Items are grouped into adding, changing and deprecating, with breaking items first, and events and user properties shown separately. The plan before and after is a table, not YAML, and a list shows the existing events the agent checked and found unaffected, so you can see the impact check happened.
How do I approve, edit or reject a tracking change?
- Open the pull request's review page from the inbox or from the link in the agent's comment.
- Edit any field that's wrong. Your edits go into the item's
finalcopy; the agent'sproposedcopy stays for comparison. - Add a note if the agent should do something specific. It's binding. Mark it as a rule to add it to
.datalyze/conventions.mdfor every future pull request. - Add an event or property the agent missed.
- Approve or reject each item. A rejection needs a reason, which goes into
.datalyze/decisions.yaml. - Submit. The page commits the edited proposal file to the pull request's branch with your GitHub token, then posts one comment from your account with the commands, such as
/datalyze approve p1,p3 @1a2b3c4and/datalyze reject p2 "reason". The@1a2b3c4names the version of the proposal file you reviewed.
GitHub runs the workflow on that comment exactly as if you had typed it, and the runner checks you're a reviewer the same way.
Which tracking changes can be approved in bulk?
Only additive, high-confidence items. Breaking changes, deprecations, money events and anything below high confidence each need approving by name. Money events are those whose names match money_patterns in .datalyze/config.yaml; the default list includes payment, order, purchase, checkout and subscription. A plain /datalyze approve skips the rest and says which items are left.
What happens if an item changes after I approve it?
The approval is tied to the item's content when you gave it. If anyone edits the item afterwards, it goes back to awaiting review and needs approving again. An approval sent from the review page also names the version of the proposal file you saw, so if the file changed between your review and your submit, the runner refuses the approval and says the proposal changed since you reviewed it.
How do I sign off a verified tracking change?
Once the agent has pushed its verified commit, the review page shows each item with its verification results, what each event actually sent next to what the plan expects, any wording the agent refined after approval, and a link to the code diff. Signing off posts /datalyze signoff and turns datalyze/tracking green on that commit. On GitHub, comment the same command.
Which Tracking Agent comment commands can I use on GitHub?
| Command | What it does | Who can use it |
|---|---|---|
/datalyze approve | Approves every pending additive, high-confidence item | Reviewers |
/datalyze approve p1,p3 | Approves these items; breaking changes, deprecations and money events need this. The review page adds @<sha>, as in approve p1,p3 @1a2b3c4, so the approval covers exactly the proposal you reviewed; a typed command doesn't need it | Reviewers |
/datalyze reject p2 "reason" | Rejects an item; the reason goes into decisions.yaml | Reviewers |
/datalyze drop p2 | Drops an item that failed verification and carries on with the rest | Reviewers |
/datalyze choose p1 B | Answers a "Needs a decision" question with one of its lettered options | Reviewers |
/datalyze answer q1 "text" | Answers an open question in words. q ids are the proposal's questions, d ids are decisions raised while implementing, v ids are the verifier's questions | Reviewers |
/datalyze retry | Runs analysis or verification again: after you fix an error or an environment problem, or when a run is stuck on analysing or implementing | Reviewers and the pull request's author |
/datalyze signoff | Signs off on the verified result | Reviewers |
/datalyze skip "reason" | Passes the check without running it; logged and flagged in the next audit | Maintainers |
Commands run only from the workflow on your default branch, because GitHub runs issue_comment workflows from there. Put each command on its own line. Editing an old comment never adds a command, and comments from bots never start a run.
Questions about reviewing
Do reviewers need a Datalyze account?
No. Reviewers sign in with GitHub only. Who may approve is set by their access to the repo and the reviewers list in .datalyze/config.yaml.
Can someone who doesn't write code review tracking?
Yes. The review page shows each item with the question it answers and the plan before and after as a table, so nobody has to read YAML. The playbook chapter on creating a tracking plan is good background for a first review, and for a team new to tracking plans our analytics setup service designs the first one with you.
Is a typed command different from one sent by the review page?
Only in one detail. Both are comments from your GitHub account and run the same way; the review page adds a line saying the commands came from it, and adds @<sha> to approvals so they cover exactly the proposal you saw.
Why does my approval say I'm not a reviewer?
Your GitHub login, or a team you're in, isn't in reviewers in .datalyze/config.yaml on the pull request's base branch. Add it in a pull request to the default branch, which counts once it merges, or ask someone who is listed.