tracking-plan
Skill4 starsChanged 30 days agoMITView on GitHub
Write the measurement plan for a site before anything is built, covering events, data-layer contract for developers, GA4 custom dimensions, Ads conversion actions and goals, consent and naming. Use when the user says "set up tracking", "what should we track", "tracking plan for <site>", "plan our conversions", "we're launching a new site", or before the gtm-build skill.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Timi-Fish/chinese-pm-skillstheir own version, first seen Oct 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Timi-Fish/chinese-pm-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- ads-auditSkill
- campaign-architectSkill
- consent-auditSkill
- demand-gen-launchSkill
- event-auditSkill
- gtm-buildSkill
- monthly-reportSkill
- performance-insightsSkill
- pre-launch-checkSkill
- search-launchSkill
- setupSkill
- tracking-auditSkill
- weekly-checkSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Call account_profile first (container, property, currency, writes).
- Very specific: line 54
Use GA4 recommended event names (generate_lead, purchase, sign_up) where they fit.
- Very specific: line 60
If GA4 loads through Tag Manager, the site pushes to dataLayer and never calls gtag() helpers: they do nothing in that setup.
- Very specific: line 85
GA4 custom dimensions ("Register in GA4"): Every parameter anyone will report on, as a list that feeds ga4_custom_dimensions (action: …
- Very specific: line 88
Not retroactive: they must exist before launch.
- Very specific: line 122
Never build or change anything from this skill: hand the plan to gtm-build.
- Distinctive: line 123
Never plan a trigger on visible text, a thank-you message or a toast.
- Very specific: line 124
Never plan a lead event on submit or on response.ok alone.
- Distinctive: line 125
Never plan a conversion on page views, or two primary actions that count the same lead.
- Distinctive: line 126
Never use real customer data in examples.
- Very specific: line 127
If the profile is read-only, the whole plan is still delivered.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tracking plan
Decide what counts as a lead, where it fires and how it reaches GA4 and Google Ads, in one document developers and
the gtm-build skill can execute without guessing. Nothing is changed here: this skill reads and writes the plan.
When to use
- A new site, redesign or launch, or tracking that was never designed (only page views, ad-hoc tags).
- New lead types or audiences (a second product line, a consumer section, a booking widget).
- The
tracking-auditskill found gaps big enough that patching isn't worth it.
Inputs
accountwithgtmContainerIdandga4PropertyIdset (check withaccount_profile; thesetupskill adds them).- The answers to the interview in step 1. Ask once, all together; don't drip questions across turns.
Steps
Call account_profile first (container, property, currency, writes). Use guide("gtm") for recipes and naming and
guide("measurement") for success signals, dedup and consent.
- Interview (once).
- Business outcomes: what is a lead or sale worth, and which ones should bidding chase?
- Lead and purchase types: forms (which ones), quote requests, bookings, purchases.
- Audiences and how pages separate them: URL path (
/business/vs/consumer/), hostname, or language folder. The split must be visible in the URL or the data layer, or the tags can't tell audiences apart. - Contact channels: forms, messaging-app links,
tel:andmailto:links, a booking widget or chat (third-party widgets often run in an iframe and need the vendor's own event or callback). - Consent: which regions require opt-in, which consent banner (CMP) the site uses, and who owns it.
- Who implements the site side (developers, CMS plugin, agency) and how they deploy.
- Read what exists, so the plan reuses rather than duplicates:
gtm_overview(live version, unpublished changes), thengtm_listwithentity: "tags",entity: "triggers"andentity: "variables".ga4_list_key_eventsandga4_custom_dimensionswithaction: "list".- Ads actions with
run_gaql_query:SELECT conversion_action.id, conversion_action.name, conversion_action.category, conversion_action.counting_type, conversion_action.primary_for_goal, conversion_action.status FROM conversion_action, and goals withSELECT custom_conversion_goal.id, custom_conversion_goal.name, custom_conversion_goal.conversion_actions FROM custom_conversion_goal. - Existing actions with history are reused and renamed (
ads_update_conversion_action), not replaced.
Event matrix. One row per lead type and audience. Leads count once per click; purchases many per click. Page views and micro-events (scroll, video, outbound clicks) stay secondary or out of Ads entirely.
Event Fires on Audience split GA4 key event? Ads action (counting) Custom goal generate_lead data layer push on confirmed form success Page Path ^/business/yes Ads - Business Lead - Form (one per click) Business Leads generate_lead same event Page Path ^/business/negatedyes Ads - Consumer Lead - Form (one per click) Consumer Leads contact_click messaging / tel:link clicksame split yes Ads - Business Lead - Messaging (one per click) Business Leads Use GA4 recommended event names (
generate_lead,purchase,sign_up) where they fit; custom names are lowercase snake_case, 40 characters max, and never reuse a reserved name.Data-layer contract for developers. One copy-ready block per event, with these rules written above them:
- Push only on real success: after the server confirms the lead, not on submit, and not on
response.okalone (spam honeypots return 200 on purpose). Gate on an explicit success marker in the response. event_idis generated once in the browser per lead and reused for any server-side copy (dedup).- If GA4 loads through Tag Manager, the site pushes to
dataLayerand never callsgtag()helpers: they do nothing in that setup. - Single-page apps also push a page view on every route change, unless GA4 enhanced measurement's history-change page views are on (then they'd double count).
window.dataLayer = window.dataLayer || []; dataLayer.push({ event: "generate_lead", form_name: "contact", // stable id, not the visible title lead_type: "form", // form | messaging | phone | email | booking product: "…", // product or service the lead is about page_language: "en", value: 120, // optional: only when the site knows a real value (number, no symbol) currency: "USD", // optional: only together with value event_id: "<uuid generated once>" });Omit
valueandcurrencywhen the site doesn't know a real value for this lead: never push a placeholder0. A value sent by the tag overrides the Ads action's default value, so a0records every conversion as worthless and breaks value-based bidding. Without a site value, the action's default value (step 6) applies.Link clicks (messaging,
tel:,mailto:) need no site code: Tag Manager catches them. List every link variant per audience (wa.me,api.whatsapp.com, a footer number such as+15550100).- Push only on real success: after the server confirms the lead, not on submit, and not on
- GA4 custom dimensions ("Register in GA4"). Every parameter anyone will report on, as a list that feeds
ga4_custom_dimensions(action: "create",parameterName,displayName,scope: "EVENT"): for exampleform_name→ "Form name",lead_type→ "Lead type",product→ "Product",page_language→ "Page language". Not retroactive: they must exist before launch. Skip high-cardinality values (event_id, free text): they hit GA4's "(other)" row and the custom dimension quota. - Ads actions and goals ("New Ads conversion actions"). A list that feeds
ads_create_conversion_action:name(naming below),category(SUBMIT_LEAD_FORM,CONTACT,PHONE_CALL_LEAD,BOOK_APPOINTMENT,PURCHASE…),countingType(ONE_PER_CLICKfor leads),value/currencyas the action's default when leads have a known average worth (used whenever the tag sends no value; see step 4),primary. Mark which existing actions are reused, which become secondary (ads_set_conversion_primary), and one custom goal per audience (ads_create_custom_goal, thenads_assign_custom_goalto that audience's campaigns). - Consent. Per tag: which consent types it needs (
ad_storage,analytics_storage,ad_user_data,ad_personalization). A Consent Mode v2 default fires first, denied in opt-in regions. Region logic fails closed: grant only for an explicitly allowed region, never "anything that isn't the restricted one", and never persist a guessed region. Vendor pixels move into Tag Manager so they inherit the gate. Theconsent-auditskill checks this after the build. - Naming.
DLV - <key>,CE - <event> - <audience>,Link - <channel> - <audience>,GA4 Event - <event>,Ads - <Audience> Lead - <channel>; GTM versions<date> <what>(for example2026-10-15 lead tracking). - Build order for the
gtm-buildskill: built-in variables to enable → custom dimensions → new Ads actions → data-layer variables → triggers → GA4 event tags → Ads conversion tags (same triggers as their GA4 tag) → consent settings → tags to pause → publish → key events → goals. Site work (step 4) ships first, or the triggers have nothing to fire on.
Output
One plan document (Markdown; HTML on request) with these sections:
- Event matrix (step 3).
- Data-layer contract (step 4), copy-ready for developers.
- GA4 custom dimensions (step 5).
- Ads actions and goals (step 6), with reuse / create / make secondary per action.
- Consent (step 7).
- Naming (step 8).
- Build order (step 9), with what's already in place ticked off.
Never
- Never build or change anything from this skill: hand the plan to
gtm-build. - Never plan a trigger on visible text, a thank-you message or a toast; always a data-layer event or a link click.
- Never plan a lead event on submit or on
response.okalone. - Never plan a conversion on page views, or two primary actions that count the same lead.
- Never use real customer data in examples; the plan uses placeholders until developers fill them.
- If the profile is read-only, the whole plan is still delivered; tell the user that building it needs
npx google-marketing-agent accounts set <alias> writes trueand an MCP client restart.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

