Tracking Agent docs
The Tracking Agent Google Sheet: tabs, notes and requests
The Google Sheet is a read-only view of your tracking plan, rebuilt from the registry after every merge to your default branch. On the plan tabs, two columns belong to people, Verified in <tool> and Analyst Notes, and every rebuild keeps them. Anyone can ask for new tracking on the Requests tab, and the agent turns each request into a proposal pull request.
What's on each tab of the tracking plan Sheet?
| Tab | What's on it | Who edits it |
|---|---|---|
| Tracking Plan | Every live event, one row per property | The sync, except Verified in <tool> and Analyst Notes |
| User Properties | Every live user property | The sync, except the same two columns |
| Super & Group Properties | Properties sent on every event, and group properties | The sync |
| Deprecated | Deprecated events and user properties with the reason, replaced_by and date, plus orphaned notes | The sync |
| Changelog | Every registry change, with the pull request and who approved it | The sync |
| Plan Health | Rule findings, counts by status, and items implemented but never verified | The sync |
| Audit | The latest audit result and every post-release watch result, item by item | The sync and the watch, except Verified and Fix; the requests job writes Fix PR |
| Pending Changes | Approved changes on open pull requests | The sync |
| Requests | What people need, in their own words | People; the agent writes the status and the pull request link |
Which Sheet columns can people edit?
On the plan tabs, Verified in <tool> (named for your analytics tool, such as Verified in Mixpanel) and Analyst Notes. On the Audit tab, Verified and Fix (below). A person marks an item verified after seeing its data arrive with the right properties; nothing else sets it, because "verified" isn't a registry status.
Each rebuild reads those two columns first and writes them back to the same row, keyed by event and property, however the rows move. If a row goes away because a property was removed or an event deprecated, its note moves to the Deprecated tab as an orphaned note, with the date, rather than being lost. Everything else on the plan tabs is rewritten by the sync.
The playbook chapter on event verification covers what to check before marking an event verified.
What's on the Sheet's Audit tab?
| Column | What it holds | Who edits it |
|---|---|---|
| Item | The event or user property | The sync |
| Type | Whether the item is an event or a user property | The sync |
| Bucket | Its audit bucket, such as healthy, broken or dead | The sync |
| Checks | The checks listed against it | The sync |
| Source | "Audit", "Audit (scope)" for a scoped audit, or "Watch PR #n" from the post-release watch | The sync |
| Audit Date | When the audit or watch ran | The sync |
| Verified | A person's mark that the item's data is right | People |
| Fix | yes (or ✓ or x) to ask for a fix pull request | People |
| Fix PR | The link to the fix pull request | The requests job |
Every column except Verified and Fix is protected. Each rebuild keeps those two columns, and every watch row, matched by Source, Item and Type. A ticked Fix is picked up by the hourly requests job, which opens one fix pull request per area; the audit says how fixes go through review.
How does the Requests tab work?
- Anyone with access writes a row: what they need in plain words, such as "which coupon was used at checkout", and who they are. They leave the status empty.
- Every hour, the agent picks up new rows a few at a time (5 per run by default, set by
requests.max_per_runin.datalyze/config.yaml) and marks each one Processing before it starts. Rows past the limit wait for the next run. - For each row it proposes tracking changes against the registry and the code, checked the same way as any pull request's proposal, opens a pull request with the proposal, and writes the pull request link and status back to the row.
- The PR check takes that proposal over as it stands only if it carries a valid signature from the runner and the pull request has no other changes. Once anyone else pushes to it, the pull request is analysed like any other.
- The request goes through normal review: a person approves, the agent implements and verifies, a person signs off. The row's status follows along until it merges.
If the agent can't tell what's needed, the row's status says it needs more detail, with a question in the note. Add the detail, clear the status, and it goes round again. A row marked Failed says what went wrong in the note; clear the status to try again.
How do I connect a Google Sheet to the Tracking Agent?
With the Datalyze template: no Google Cloud project
- Make the Sheet from the Datalyze template. It adds a Datalyze menu.
- Use the menu to connect it. That creates the tabs and a token.
- Deploy the template's script as an Apps Script web app, running as you.
- Paste the web app's URL and the token into setup. They become the repo secrets
DATALYZE_SHEET_URLandDATALYZE_SHEET_TOKEN.
The script answers only requests that carry the token, and runs as you, so it can reach only this Sheet.
With a Google service account
- In a Google Cloud project, enable the Google Sheets API and create a service account with a JSON key.
- Share the Sheet with the service account's email as an editor.
- Save the whole JSON key as the repo secret
GOOGLE_SERVICE_ACCOUNT_JSON. - Set
sheet.mode: service_accountandsheet.spreadsheet_idin.datalyze/config.yaml. The ID is the part of the Sheet's URL after/spreadsheets/d/.
When does the Sheet update?
After every merge to your default branch, datalyze sync-sheet rebuilds it from the registry on that branch. A failed sync never blocks a pull request or a merge: it's tried once more in the same run, and if that fails too, only that workflow run fails and the Sheet stays as it was until the next merge. To rebuild it by hand, open Actions, then Datalyze, then Run workflow, and pick sync-sheet.
Questions about the Google Sheet
Can we edit tracking in the Google Sheet?
No. The registry in your repo is the source of truth, and the sync rewrites the plan tabs from it. Ask for changes on the Requests tab, or change the registry in a pull request.
Do we need the Google Sheet at all?
No. It's optional, for people who'd rather read a spreadsheet than YAML. The PR check and the audit work the same without it.
Does our Sheet data go through Datalyze?
No. The runner sends updates straight to your Sheet's script or through the Google Sheets API with your service account.
We don't have a tracking plan to put in a Sheet yet. Where do we start?
The free event tracking plan generator drafts one, and our analytics setup service builds it with you.