Analytics Tracking Plan skill

Master analytics tracking plan for PLG and B2B SaaS — unified event taxonomy, pixel strategy (1P and 3P tagging), marketing attribution architecture, CDP implementation (Segment, Rudderstack), product analytics (Amplitude, Mixpanel, PostHog), CRM tracking (HubSpot, Salesforce), and analytics infrastructure design.

by LeadMagic·MIT license·★ 62 Stars on the repo·GitHub ↗

Use now

Inside this skill

SKILL.md · the author's own words
# Analytics Tracking Plan

## Overview

Most companies have tracking — they just don't have a plan. Events fire into
the void. Pixels fire twice (or never). Marketing attributes credit to the
wrong channel. Product doesn't know what marketing tracks. Nobody trusts the
data. The mistake: adding tracking ad-hoc without a unified plan. This skill
covers the complete analytics tracking architecture for PLG and B2B SaaS:
event taxonomy, pixel strategy, attribution architecture, CDP implementation,
and the analytics stack that makes it all work together.

## Authoritative Foundations

- **Segment** — Customer Data Platform (CDP) and Tracking Plan spec
- **Amplitude** — Product analytics and behavioral cohorts

Word-for-word excerpt, not a result. Read the full SKILL.md ↓

Files of Analytics Tracking Plan

LeadMagic/main1 file shown
SKILL.md
Show the full text441 lines

Analytics Tracking Plan

Overview

Most companies have tracking — they just don't have a plan. Events fire into the void. Pixels fire twice (or never). Marketing attributes credit to the wrong channel. Product doesn't know what marketing tracks. Nobody trusts the data. The mistake: adding tracking ad-hoc without a unified plan. This skill covers the complete analytics tracking architecture for PLG and B2B SaaS: event taxonomy, pixel strategy, attribution architecture, CDP implementation, and the analytics stack that makes it all work together.

Authoritative Foundations

  • Segment — Customer Data Platform (CDP) and Tracking Plan spec
  • Amplitude — Product analytics and behavioral cohorts
  • PostHog — Open-source product analytics
  • Mixpanel — Event-based analytics
  • Google Analytics 4 (GA4) — Web analytics and conversions
  • Elena Verna (Reforge/Amplitude) — PLG analytics models
  • Brian Balfour (Reforge) — Growth models and tracking — Growth loops — acquisition/retention loops, not funnel-only thinking.
  • OpenView — PLG benchmarks and metrics — Expansion SaaS benchmarks — PLG, sales-assist, and GTM efficiency.
  • Avo — Tracking plan governance and code generation

When to Use

Trigger phrases: "tracking plan", "analytics plan", "analytics architecture", "event tracking strategy", "pixel strategy", "CDP implementation", "analytics for PLG", "SaaS analytics stack", "unified tracking plan", "marketing tracking", "product analytics implementation", "analytics audit"

The Unified Tracking Architecture

                    ┌─────────────────────────────────┐
                    │        YOUR SAAS PRODUCT          │
                    │  (Web App, API, Backend, Email)  │
                    └──────────┬──────────────────────┘
                               │
                    ┌──────────▼──────────────────────┐
                    │   CDP LAYER (Segment/Rudderstack) │
                    │   Event Collection + Routing      │
                    └──────┬───────────┬───────────────┘
                           │           │
         ┌─────────────────▼──┐   ┌───▼──────────────────┐
         │ PRODUCT ANALYTICS   │   │ MARKETING ANALYTICS   │
         │ Amplitude/Mixpanel  │   │ GA4 / Ads Pixels      │
         │ PostHog             │   │ Attribution Tools      │
         └─────────────────────┘   └───────────────────────┘
                           │           │
         ┌─────────────────▼──┐   ┌───▼──────────────────┐
         │ CRM + CS ANALYTICS  │   │ DATA WAREHOUSE        │
         │ HubSpot/Salesforce  │   │ Snowflake/BigQuery     │
         │ Intercom/Zendesk    │   │ + BI (Metabase/Looker) │
         └─────────────────────┘   └───────────────────────┘

Step-by-Step Process

Phase 1: The Tracking Plan Document

What it is: A single source of truth for every event, property, and destination in your analytics infrastructure. Every developer, marketer, and analyst references the same document.

The Tracking Plan template (Google Sheets / Notion / Avo):

TRACKING PLAN — [Company]

SHEET 1: EVENT CATALOG
| Event Name | Category | Trigger | Properties | Destinations | Owner | Status |
|---|---|---|---|---|---|---|
| Signed Up | Account | POST /auth/signup | plan, source, referrer, utm_* | Segment→GA4,Amplitude,HubSpot | Eng | Live |
| Feature Used | Usage | Client-side click | feature_name, context | Segment→Amplitude | Product | Live |
| ... | | | | | | |

SHEET 2: PROPERTY CATALOG
| Property Name | Type | Example Values | Events Using | Description |
|---|---|---|---|---|---|
| plan | string | starter, growth, enterprise | Signed Up, Upgraded, Downgraded | Customer's subscription plan |
| source | string | google_ads, linkedin, referral | Signed Up | Acquisition channel |
| ... | | | | |

SHEET 3: DESTINATIONS
| Destination | Purpose | Events Routed | Owner |
|---|---|---|---|
| Amplitude | Product analytics — retention, funnels, cohorts | All usage + account events | Product |
| GA4 | Web analytics — traffic, conversions, ad attribution | Page views, signups, conversions | Marketing |
| HubSpot | CRM — lead scoring, lifecycle stages | Account events, email events | RevOps |
| Intercom | Event-triggered messaging | All usage + milestone events | CS |
| Data Warehouse | BI — cross-functional reporting | All events | Data |

SHEET 4: IDENTITIES
| Identity Type | How It's Set | When | Example |
|---|---|---|---|
| anonymous_id | Auto-generated (cookie/localStorage) | First visit | uuid |
| user_id | Backend generates on signup | After authentication | user_abc123 |
| group_id | Workspace/account ID | After login (B2B) | ws_xyz789 |
| email | identify() call | After signup/login | [email protected] |

SHEET 5: UTM / ATTRIBUTION
| Parameter | Required | Example | Purpose |
|---|---|---|---|
| utm_source | Yes | google, linkedin, newsletter | Acquisition source |
| utm_medium | Yes | cpc, organic, email, social | Channel type |
| utm_campaign | Yes | q1_launch, black_friday | Campaign name |
| utm_content | Optional | variant_a, cta_hero | Creative variant |
| utm_term | Optional | cold+email+tool | Keyword (paid search) |
| referrer | Auto | document.referrer | Referring URL |
| landing_page | Auto | window.location.pathname | First page visited |
| gclid | Auto | Google Ads auto-tagging | Google Click ID |
| fbclid | Auto | Facebook auto-tagging | Facebook Click ID |
Phase 2: Event Taxonomy for PLG and SaaS

Build the event taxonomy in references/event-taxonomy.md when the task needs the full PLG/SaaS event library. In SKILL.md, capture only the chosen event groups, naming rules, owners, and QA gates.

Phase 3: Pixel Strategy (1P and 3P Tagging)

The progressive pixel architecture:

TIER 1: FIRST-PARTY (Essential — always on)
  └─ CDP (Segment/Rudderstack) — server-side SDK
     No ad blockers can block server-side events.
     Critical events (signup, payment, subscription) go server-side.

TIER 2: FIRST-PARTY (Product — always on)
  └─ CDP (Segment/Rudderstack) — client-side SDK
     Behavioral events. Some ad-blocker loss (~15-30%).
     Acceptable for product analytics (you don't need 100% of
     behavioral events — you need enough to see patterns).

TIER 3: MARKETING PIXELS (Conditional — consent required)
  └─ GA4 (Google Analytics)
  └─ Google Ads Conversion Tracking
  └─ LinkedIn Insight Tag
  └─ Meta (Facebook) Pixel
  └─ Twitter/X Pixel
  └─ Reddit Pixel
  └─ Quora Pixel
  └─ Microsoft (Bing) Ads UET

TIER 4: RETARGETING (Conditional — consent required)
  └─ Google Ads Remarketing
  └─ LinkedIn Matched Audiences
  └─ Meta Custom Audiences
  └─ AdRoll / Criteo (if using)

Pixel implementation hierarchy:

Server-side (via CDP) — PRIMARY:
  Segment/Rudderstack → Google Ads (enhanced conversions)
  Segment/Rudderstack → Meta CAPI (Conversions API)
  Segment/Rudderstack → LinkedIn CAPI
  These are ad-blocker resistant and privacy-safe.

Client-side (via GTM) — SECONDARY:
  Google Tag Manager (GTM) loads marketing pixels
  Consent management (Cookiebot/OneTrust) gates all marketing pixels
  GTM fires only when user has consented to marketing cookies

Server-side GTM (sGTM) — ADVANCED:
  GTM server-side container proxies all pixel requests
  Your server → sGTM → marketing platforms
  First-party domain for tracking (e.g., analytics.yourdomain.com)
  This is the gold standard for privacy-safe, ad-blocker-resistant tracking

Pixel audit checklist:

□ Every pixel has a purpose (no "we might use this someday" pixels)
□ Consent management gates all marketing pixels
□ Pixels fire ONCE (no duplicate firing from GTM + CDP)
□ Server-side tracking for critical conversion events
□ All pixels documented: what fires when, what data it sends
□ Regular audit: remove unused pixels (they slow down the page)
□ GDPR: marketing pixels only fire with consent
□ CCPA: "Do Not Sell" respected — data sharing pixels disabled
Phase 4: Attribution Architecture

Multi-touch attribution model:

FIRST-Touch: Which channel introduced them?
  → UTM params captured at first visit. Stored in cookie + user profile.

LAST-Touch: Which channel closed them?
  → UTM params at conversion. Overwrites first-touch for "last-click" view.

MULTI-Touch: Which channels touched them along the way?
  → Track every touchpoint: ad click, email click, organic visit, referral.
  → Model: linear (equal credit), time-decay (recent = more credit),
    U-shaped (first + last = most credit), W-shaped (first + MQL + SQL + close).

SELF-REPORTED: "How did you hear about us?"
  → Form field on signup/demo. Most reliable single data point.
  → Categorize responses: Search, Social, Referral, Podcast, Event, Other.

Attribution data flow:

TOUCHPOINT CAPTURE:
1. First visit → capture UTM + referrer → store in first-touch cookie
2. Subsequent visits → append to visit log (timestamp, source, medium)
3. Signup/Conversion → capture UTM + referrer → store in user profile
4. CRM → Sales tags opportunity source (can override self-reported)

ATTRIBUTION REPORTING:
- HubSpot/Salesforce: Original Source, Latest Source, Source Drill-Down
- GA4: Traffic Acquisition, User Acquisition reports
- BI Tool (Metabase/Looker/Mode): Custom multi-touch models
- Attribution tool (Dreamdata/HockeyStack/Attribution): B2B journey mapping
Phase 5: CDP Implementation

Use references/cdp-implementation.md for the full Segment/RudderStack/mParticle/warehouse routing patterns. In the main response, summarize chosen destination routing, identity policy, suppression rules, and QA checks.

Phase 6: PLG-Specific Analytics

The PLG funnel (measure every transition):

VISITOR → SIGNUP → ACTIVATION → ENGAGEMENT → CONVERSION → EXPANSION

Visitor → Signup: Signup conversion rate (target: 5-15%)
Signup → Activation: Activation rate (target: 40-60%)
Activation → Engagement: MAU/WAU/DAU ratios (target DAU/MAU > 20%)
Engagement → Conversion: Free-to-paid rate (target: 3-8%)
Conversion → Expansion: NRR (target: 110%+)

Key PLG metrics:

Metric Formula Target
PQL (Product-Qualified Lead) Rate PQLs / Total Signups 10-20%
Time to Value (TTV) Days from signup to activation < 7 days
Free-to-Paid Conversion Paid accounts / Trial starts 3-8%
DAU/MAU Daily Active / Monthly Active > 20% (sticky)
Feature Adoption Rate Users using feature / Total users > 30% (per core feature)
Viral Coefficient Invites per user × acceptance rate > 0.5 (viral if > 1.0)
Expansion MRR Rate Expansion MRR / Starting MRR > 3% monthly

PLG analytics stack:

Tool Purpose
Amplitude Product analytics — funnels, retention, cohorts, behavioral personas
Mixpanel Alternative product analytics (simpler, event-stream focused)
PostHog Open-source product analytics + session recording + feature flags
June.so PLG-specific analytics (auto-generated reports for B2B SaaS)
Pendo / Appcues In-app guides + product analytics
Heap Auto-capture analytics (no manual event tracking)
Phase 7: The Analytics Governance Playbook

Tracking plan governance:

  1. Document first, implement second. Every event goes into the tracking plan BEFORE a developer writes code.
  2. Event dictionary is law. No untracked events. No undocumented properties. If it's not in the dictionary, it doesn't exist.
  3. Breaking changes are forbidden. Properties can be added. Never removed. Events can be deprecated (stop sending). Never deleted.
  4. Review cadence: Monthly with product + marketing + data. Quarterly full audit. Remove unused events. Consolidate near-duplicates.

Testing and validation:

  • Segment: Source Debugger (real-time event stream)
  • Amplitude: Event Explorer (verify events arriving)
  • GA4: DebugView (real-time event debug)
  • Avo: Code-generated type-safe tracking functions
  • CI/CD: Test that events fire correctly on critical paths

Privacy and compliance:

  • No PII in event properties (name, email, IP, phone — use user_id instead)
  • Consent management gates all marketing pixels
  • Data retention policies documented per destination
  • GDPR: ability to delete all events for a user on request
  • SOC2: event tracking infrastructure within compliance scope

Output Format

ANALYTICS TRACKING PLAN — [Company]

Version: [X.Y]. Last Updated: [date]. Owner: [name]

EVENT CATALOG: [link to sheet — 50+ events documented]

CDP: [Segment / Rudderstack]
  - Server-side SDK: [implemented / planned]
  - Client-side SDK: [implemented / planned]

DESTINATIONS:
| Tool | Purpose | Events | Status |
|---|---|---|---|
| Amplitude | Product analytics | All usage + account | Live |
| GA4 | Web analytics + ads | Page views, signups | Live |
| HubSpot | CRM | Account events | Live |
| Intercom | Messaging | Usage + milestones | Live |
| Data Warehouse | BI | All events | Live |

PIXELS (consent-gated):
| Pixel | Purpose | Trigger | Status |
|---|---|---|---|
| Google Ads | Conversion tracking | Signed Up, Subscription Started | Live |
| LinkedIn Insight | Retargeting | All pages (consent-gated) | Live |
| Meta CAPI | Conversion API | Signed Up (server-side) | Live |

ATTRIBUTION:
- Model: [Multi-touch — U-shaped / W-shaped]
- Tool: [HubSpot / Dreamdata / HockeyStack / Custom BI]
- UTM parameters: [enforced / not yet]

PLG FUNNEL METRICS:
| Stage | Current | Target |
|---|---|---|
| Visitor → Signup | X% | Y% |
| Signup → Activation | X% | Y% |
| Activation → Paid | X% | Y% |

GOVERNANCE:
- Review cadence: [monthly / quarterly]
- Event dictionary: [link]
- Privacy: [GDPR consent, PII audit, data retention]

Implementation Checklist

  • Tracking plan document exists (spreadsheet or Avo) — not just code
  • Event taxonomy covers Account, Usage, Activation, Engagement, Revenue, Milestones
  • CDP implemented (server-side for critical events, client-side for behavioral)
  • All marketing pixels consent-gated (no pre-ticked boxes)
  • Server-side tracking for signup, payment, subscription changes
  • UTM parameters captured and persisted to user profile
  • Attribution model documented (first-touch + last-touch + multi-touch)
  • PLG funnel measured at every stage transition
  • Event dictionary maintained — no undocumented events
  • PII audit complete — no personal data in event properties
  • Monthly tracking plan review on calendar

Quality Check

Before delivering, verify:

  • Output matches the user's stated request
  • Named frameworks or sources are reflected in the recommendation
  • The deliverable is specific enough for an agent to execute
  • Any assumptions, risks, or dependencies are explicit
  • No unsupported claims, invented facts, or private/internal references are included

Common Pitfalls

  1. Tracking without a plan. Events fire into the void. No one knows what "button_clicked_3" means. The data is worthless. Fix: Tracking plan document FIRST. Implementation second. Every event has a name, purpose, properties, destinations, and owner.

  2. Client-side only. Ad blockers block 15-30% of client-side tracking. Critical events (signup, payment, subscription) are lost. Fix: Server-side tracking for revenue-critical events. CDP server-side SDK.

  3. Duplicate events. Segment fires "Signed Up." GTM also fires "SignUp." GA4 shows 2x signups. Nobody knows which number is real. Fix: One source of truth per event. Audit for duplicates. GTM ONLY handles marketing pixels, not core events.

  4. Marketing and product tracking disconnected. Marketing sees signups. Product sees activation. Nobody connects the two — can't answer "which marketing channel produces the most activated users?" Fix: Same event taxonomy. Same user_id. CDP routes to both marketing and product tools.

  5. No attribution on signup. UTM params captured on visit but lost on signup. "Where did this customer come from?" = shrug. Fix: Capture UTM params on first visit. Persist to user profile on signup. Always.

  6. PII in event properties. email: "[email protected]" tracked in every event. This is a privacy violation and a security risk. Fix: Use user_id. Store PII in your database, not your event pipeline. Only identify() call carries user traits — regular track() calls do not.

Execution Artifacts

  • references/framework-notes.md — named frameworks, citation anchors, and operating assumptions
  • references/cdp-implementation.md — CDP implementation patterns
  • references/event-taxonomy.md — Event naming and governance reference
  • templates/output-template.md — copy-paste deliverable structure for the user
  • scripts/check-output.py — local checklist validator for required sections This skill includes lightweight artifacts the agent can load on demand: Use the artifacts when the user asks for an implementation-ready deliverable, a repeatable workflow, or a quality check rather than generic advice.
  • event-analytics — Event taxonomy design, CDP architecture, event-driven GTM
  • gtm-metrics — SaaS metrics and benchmarks
  • campaign-analytics — Campaign performance, 6-layer metrics stack
  • 1p-tagging-pixels — First-party pixel implementation
  • attribution — Multi-touch attribution models
  • a-b-testing — Experiment design and statistical significance
  • cs-analytics-dashboards — CS health scores and dashboards
1---
2name: tracking-plan
3description: >-
4 Master analytics tracking plan for PLG and B2B SaaS — unified event taxonomy,
5 pixel strategy (1P and 3P tagging), marketing attribution architecture, CDP
6 implementation (Segment, Rudderstack), product analytics (Amplitude, Mixpanel,
7 PostHog), CRM tracking (HubSpot, Salesforce), and analytics infrastructure
8 design. Use when building a complete tracking plan, designing analytics
9 architecture, implementing product analytics, or aligning marketing and
10 product tracking. Triggers on: "tracking plan", "analytics plan", "event
11 tracking architecture", "pixel strategy", "analytics for PLG", "SaaS analytics".
12license: MIT
13compatibility: Claude Code, Codex, GitHub Copilot, Cursor, Gemini CLI, OpenCode, Goose, Hermes, Windsurf, Zed
14metadata:
15 version: "1.0.1"
16 author: LeadMagic
17 category: analytics
18 tags: [tracking-plan, analytics, event-tracking, pixels, attribution, cdp, plg, product-analytics]
19 related_skills: [event-analytics, gtm-metrics, campaign-analytics, 1p-tagging-pixels, attribution, a-b-testing, cs-analytics-dashboards]
20 frameworks:
21 - "Segment — Customer Data Platform (CDP) and Tracking Plan spec"
22 - "Amplitude — Product analytics and behavioral cohorts"
23 - "PostHog — Open-source product analytics"
24 - "Mixpanel — Event-based analytics"
25 - "Google Analytics 4 (GA4) — Web analytics and conversions"
26 - "Elena Verna (Reforge/Amplitude) — PLG analytics models"
27 - "Brian Balfour (Reforge) — Growth models and tracking"
28 - "OpenView — PLG benchmarks and metrics"
29 - "Avo — Tracking plan governance and code generation"
30---
31 
32# Analytics Tracking Plan
33 
34## Overview
35 
36Most companies have tracking — they just don't have a plan. Events fire into
37the void. Pixels fire twice (or never). Marketing attributes credit to the
38wrong channel. Product doesn't know what marketing tracks. Nobody trusts the
39data. The mistake: adding tracking ad-hoc without a unified plan. This skill
40covers the complete analytics tracking architecture for PLG and B2B SaaS:
41event taxonomy, pixel strategy, attribution architecture, CDP implementation,
42and the analytics stack that makes it all work together.
43 
44## Authoritative Foundations
45 
46- **Segment** — Customer Data Platform (CDP) and Tracking Plan spec
47- **Amplitude** — Product analytics and behavioral cohorts
48- **PostHog** — Open-source product analytics
49- **Mixpanel** — Event-based analytics
50- **Google Analytics 4 (GA4)** — Web analytics and conversions
51- **Elena Verna (Reforge/Amplitude)** — PLG analytics models
52- **Brian Balfour (Reforge) — Growth models and tracking** — Growth loops — acquisition/retention loops, not funnel-only thinking.
53- **OpenView — PLG benchmarks and metrics** — Expansion SaaS benchmarks — PLG, sales-assist, and GTM efficiency.
54- **Avo** — Tracking plan governance and code generation
55 
56## When to Use
57 
58Trigger phrases: "tracking plan", "analytics plan", "analytics architecture",
59"event tracking strategy", "pixel strategy", "CDP implementation", "analytics
60for PLG", "SaaS analytics stack", "unified tracking plan", "marketing tracking",
61"product analytics implementation", "analytics audit"
62 
63## The Unified Tracking Architecture
64 
65```
66 ┌─────────────────────────────────┐
67 │ YOUR SAAS PRODUCT │
68 │ (Web App, API, Backend, Email) │
69 └──────────┬──────────────────────┘
70 │
71 ┌──────────▼──────────────────────┐
72 │ CDP LAYER (Segment/Rudderstack) │
73 │ Event Collection + Routing │
74 └──────┬───────────┬───────────────┘
75 │ │
76 ┌─────────────────▼──┐ ┌───▼──────────────────┐
77 │ PRODUCT ANALYTICS │ │ MARKETING ANALYTICS │
78 │ Amplitude/Mixpanel │ │ GA4 / Ads Pixels │
79 │ PostHog │ │ Attribution Tools │
80 └─────────────────────┘ └───────────────────────┘
81 │ │
82 ┌─────────────────▼──┐ ┌───▼──────────────────┐
83 │ CRM + CS ANALYTICS │ │ DATA WAREHOUSE │
84 │ HubSpot/Salesforce │ │ Snowflake/BigQuery │
85 │ Intercom/Zendesk │ │ + BI (Metabase/Looker) │
86 └─────────────────────┘ └───────────────────────┘
87```
88 
89## Step-by-Step Process
90 
91### Phase 1: The Tracking Plan Document
92 
93**What it is:** A single source of truth for every event, property, and
94destination in your analytics infrastructure. Every developer, marketer,
95and analyst references the same document.
96 
97**The Tracking Plan template (Google Sheets / Notion / Avo):**
98 
99```
100TRACKING PLAN — [Company]
101 
102SHEET 1: EVENT CATALOG
103| Event Name | Category | Trigger | Properties | Destinations | Owner | Status |
104|---|---|---|---|---|---|---|
105| Signed Up | Account | POST /auth/signup | plan, source, referrer, utm_* | Segment→GA4,Amplitude,HubSpot | Eng | Live |
106| Feature Used | Usage | Client-side click | feature_name, context | Segment→Amplitude | Product | Live |
107| ... | | | | | | |
108 
109SHEET 2: PROPERTY CATALOG
110| Property Name | Type | Example Values | Events Using | Description |
111|---|---|---|---|---|---|
112| plan | string | starter, growth, enterprise | Signed Up, Upgraded, Downgraded | Customer's subscription plan |
113| source | string | google_ads, linkedin, referral | Signed Up | Acquisition channel |
114| ... | | | | |
115 
116SHEET 3: DESTINATIONS
117| Destination | Purpose | Events Routed | Owner |
118|---|---|---|---|
119| Amplitude | Product analytics — retention, funnels, cohorts | All usage + account events | Product |
120| GA4 | Web analytics — traffic, conversions, ad attribution | Page views, signups, conversions | Marketing |
121| HubSpot | CRM — lead scoring, lifecycle stages | Account events, email events | RevOps |
122| Intercom | Event-triggered messaging | All usage + milestone events | CS |
123| Data Warehouse | BI — cross-functional reporting | All events | Data |
124 
125SHEET 4: IDENTITIES
126| Identity Type | How It's Set | When | Example |
127|---|---|---|---|
128| anonymous_id | Auto-generated (cookie/localStorage) | First visit | uuid |
129| user_id | Backend generates on signup | After authentication | user_abc123 |
130| group_id | Workspace/account ID | After login (B2B) | ws_xyz789 |
131| email | identify() call | After signup/login | [email protected] |
132 
133SHEET 5: UTM / ATTRIBUTION
134| Parameter | Required | Example | Purpose |
135|---|---|---|---|
136| utm_source | Yes | google, linkedin, newsletter | Acquisition source |
137| utm_medium | Yes | cpc, organic, email, social | Channel type |
138| utm_campaign | Yes | q1_launch, black_friday | Campaign name |
139| utm_content | Optional | variant_a, cta_hero | Creative variant |
140| utm_term | Optional | cold+email+tool | Keyword (paid search) |
141| referrer | Auto | document.referrer | Referring URL |
142| landing_page | Auto | window.location.pathname | First page visited |
143| gclid | Auto | Google Ads auto-tagging | Google Click ID |
144| fbclid | Auto | Facebook auto-tagging | Facebook Click ID |
145```
146 
147### Phase 2: Event Taxonomy for PLG and SaaS
148 
149Build the event taxonomy in `references/event-taxonomy.md` when the task needs the full PLG/SaaS event library. In SKILL.md, capture only the chosen event groups, naming rules, owners, and QA gates.
150 
151### Phase 3: Pixel Strategy (1P and 3P Tagging)
152 
153**The progressive pixel architecture:**
154 
155```
156TIER 1: FIRST-PARTY (Essential — always on)
157 └─ CDP (Segment/Rudderstack) — server-side SDK
158 No ad blockers can block server-side events.
159 Critical events (signup, payment, subscription) go server-side.
160 
161TIER 2: FIRST-PARTY (Product — always on)
162 └─ CDP (Segment/Rudderstack) — client-side SDK
163 Behavioral events. Some ad-blocker loss (~15-30%).
164 Acceptable for product analytics (you don't need 100% of
165 behavioral events — you need enough to see patterns).
166 
167TIER 3: MARKETING PIXELS (Conditional — consent required)
168 └─ GA4 (Google Analytics)
169 └─ Google Ads Conversion Tracking
170 └─ LinkedIn Insight Tag
171 └─ Meta (Facebook) Pixel
172 └─ Twitter/X Pixel
173 └─ Reddit Pixel
174 └─ Quora Pixel
175 └─ Microsoft (Bing) Ads UET
176 
177TIER 4: RETARGETING (Conditional — consent required)
178 └─ Google Ads Remarketing
179 └─ LinkedIn Matched Audiences
180 └─ Meta Custom Audiences
181 └─ AdRoll / Criteo (if using)
182```
183 
184**Pixel implementation hierarchy:**
185 
186```
187Server-side (via CDP) — PRIMARY:
188 Segment/Rudderstack → Google Ads (enhanced conversions)
189 Segment/Rudderstack → Meta CAPI (Conversions API)
190 Segment/Rudderstack → LinkedIn CAPI
191 These are ad-blocker resistant and privacy-safe.
192 
193Client-side (via GTM) — SECONDARY:
194 Google Tag Manager (GTM) loads marketing pixels
195 Consent management (Cookiebot/OneTrust) gates all marketing pixels
196 GTM fires only when user has consented to marketing cookies
197 
198Server-side GTM (sGTM) — ADVANCED:
199 GTM server-side container proxies all pixel requests
200 Your server → sGTM → marketing platforms
201 First-party domain for tracking (e.g., analytics.yourdomain.com)
202 This is the gold standard for privacy-safe, ad-blocker-resistant tracking
203```
204 
205**Pixel audit checklist:**
206```
207□ Every pixel has a purpose (no "we might use this someday" pixels)
208□ Consent management gates all marketing pixels
209□ Pixels fire ONCE (no duplicate firing from GTM + CDP)
210□ Server-side tracking for critical conversion events
211□ All pixels documented: what fires when, what data it sends
212□ Regular audit: remove unused pixels (they slow down the page)
213□ GDPR: marketing pixels only fire with consent
214□ CCPA: "Do Not Sell" respected — data sharing pixels disabled
215```
216 
217### Phase 4: Attribution Architecture
218 
219**Multi-touch attribution model:**
220 
221```
222FIRST-Touch: Which channel introduced them?
223 → UTM params captured at first visit. Stored in cookie + user profile.
224 
225LAST-Touch: Which channel closed them?
226 → UTM params at conversion. Overwrites first-touch for "last-click" view.
227 
228MULTI-Touch: Which channels touched them along the way?
229 → Track every touchpoint: ad click, email click, organic visit, referral.
230 → Model: linear (equal credit), time-decay (recent = more credit),
231 U-shaped (first + last = most credit), W-shaped (first + MQL + SQL + close).
232 
233SELF-REPORTED: "How did you hear about us?"
234 → Form field on signup/demo. Most reliable single data point.
235 → Categorize responses: Search, Social, Referral, Podcast, Event, Other.
236```
237 
238**Attribution data flow:**
239 
240```
241TOUCHPOINT CAPTURE:
2421. First visit → capture UTM + referrer → store in first-touch cookie
2432. Subsequent visits → append to visit log (timestamp, source, medium)
2443. Signup/Conversion → capture UTM + referrer → store in user profile
2454. CRM → Sales tags opportunity source (can override self-reported)
246 
247ATTRIBUTION REPORTING:
248- HubSpot/Salesforce: Original Source, Latest Source, Source Drill-Down
249- GA4: Traffic Acquisition, User Acquisition reports
250- BI Tool (Metabase/Looker/Mode): Custom multi-touch models
251- Attribution tool (Dreamdata/HockeyStack/Attribution): B2B journey mapping
252```
253 
254### Phase 5: CDP Implementation
255 
256Use `references/cdp-implementation.md` for the full Segment/RudderStack/mParticle/warehouse routing patterns. In the main response, summarize chosen destination routing, identity policy, suppression rules, and QA checks.
257 
258### Phase 6: PLG-Specific Analytics
259 
260**The PLG funnel (measure every transition):**
261 
262```
263VISITOR → SIGNUP → ACTIVATION → ENGAGEMENT → CONVERSION → EXPANSION
264 
265Visitor → Signup: Signup conversion rate (target: 5-15%)
266Signup → Activation: Activation rate (target: 40-60%)
267Activation → Engagement: MAU/WAU/DAU ratios (target DAU/MAU > 20%)
268Engagement → Conversion: Free-to-paid rate (target: 3-8%)
269Conversion → Expansion: NRR (target: 110%+)
270```
271 
272**Key PLG metrics:**
273 
274| Metric | Formula | Target |
275|---|---|---|
276| PQL (Product-Qualified Lead) Rate | PQLs / Total Signups | 10-20% |
277| Time to Value (TTV) | Days from signup to activation | < 7 days |
278| Free-to-Paid Conversion | Paid accounts / Trial starts | 3-8% |
279| DAU/MAU | Daily Active / Monthly Active | > 20% (sticky) |
280| Feature Adoption Rate | Users using feature / Total users | > 30% (per core feature) |
281| Viral Coefficient | Invites per user × acceptance rate | > 0.5 (viral if > 1.0) |
282| Expansion MRR Rate | Expansion MRR / Starting MRR | > 3% monthly |
283 
284**PLG analytics stack:**
285 
286| Tool | Purpose |
287|---|---|
288| Amplitude | Product analytics — funnels, retention, cohorts, behavioral personas |
289| Mixpanel | Alternative product analytics (simpler, event-stream focused) |
290| PostHog | Open-source product analytics + session recording + feature flags |
291| June.so | PLG-specific analytics (auto-generated reports for B2B SaaS) |
292| Pendo / Appcues | In-app guides + product analytics |
293| Heap | Auto-capture analytics (no manual event tracking) |
294 
295### Phase 7: The Analytics Governance Playbook
296 
297**Tracking plan governance:**
2981. **Document first, implement second.** Every event goes into the tracking
299 plan BEFORE a developer writes code.
3002. **Event dictionary is law.** No untracked events. No undocumented properties.
301 If it's not in the dictionary, it doesn't exist.
3023. **Breaking changes are forbidden.** Properties can be added. Never removed.
303 Events can be deprecated (stop sending). Never deleted.
3044. **Review cadence:** Monthly with product + marketing + data. Quarterly full
305 audit. Remove unused events. Consolidate near-duplicates.
306 
307**Testing and validation:**
308- Segment: Source Debugger (real-time event stream)
309- Amplitude: Event Explorer (verify events arriving)
310- GA4: DebugView (real-time event debug)
311- Avo: Code-generated type-safe tracking functions
312- CI/CD: Test that events fire correctly on critical paths
313 
314**Privacy and compliance:**
315- No PII in event properties (name, email, IP, phone — use user_id instead)
316- Consent management gates all marketing pixels
317- Data retention policies documented per destination
318- GDPR: ability to delete all events for a user on request
319- SOC2: event tracking infrastructure within compliance scope
320 
321## Output Format
322 
323```
324ANALYTICS TRACKING PLAN — [Company]
325 
326Version: [X.Y]. Last Updated: [date]. Owner: [name]
327 
328EVENT CATALOG: [link to sheet — 50+ events documented]
329 
330CDP: [Segment / Rudderstack]
331 - Server-side SDK: [implemented / planned]
332 - Client-side SDK: [implemented / planned]
333 
334DESTINATIONS:
335| Tool | Purpose | Events | Status |
336|---|---|---|---|
337| Amplitude | Product analytics | All usage + account | Live |
338| GA4 | Web analytics + ads | Page views, signups | Live |
339| HubSpot | CRM | Account events | Live |
340| Intercom | Messaging | Usage + milestones | Live |
341| Data Warehouse | BI | All events | Live |
342 
343PIXELS (consent-gated):
344| Pixel | Purpose | Trigger | Status |
345|---|---|---|---|
346| Google Ads | Conversion tracking | Signed Up, Subscription Started | Live |
347| LinkedIn Insight | Retargeting | All pages (consent-gated) | Live |
348| Meta CAPI | Conversion API | Signed Up (server-side) | Live |
349 
350ATTRIBUTION:
351- Model: [Multi-touch — U-shaped / W-shaped]
352- Tool: [HubSpot / Dreamdata / HockeyStack / Custom BI]
353- UTM parameters: [enforced / not yet]
354 
355PLG FUNNEL METRICS:
356| Stage | Current | Target |
357|---|---|---|
358| Visitor → Signup | X% | Y% |
359| Signup → Activation | X% | Y% |
360| Activation → Paid | X% | Y% |
361 
362GOVERNANCE:
363- Review cadence: [monthly / quarterly]
364- Event dictionary: [link]
365- Privacy: [GDPR consent, PII audit, data retention]
366```
367 
368## Implementation Checklist
369 
370- [ ] Tracking plan document exists (spreadsheet or Avo) — not just code
371- [ ] Event taxonomy covers Account, Usage, Activation, Engagement, Revenue, Milestones
372- [ ] CDP implemented (server-side for critical events, client-side for behavioral)
373- [ ] All marketing pixels consent-gated (no pre-ticked boxes)
374- [ ] Server-side tracking for signup, payment, subscription changes
375- [ ] UTM parameters captured and persisted to user profile
376- [ ] Attribution model documented (first-touch + last-touch + multi-touch)
377- [ ] PLG funnel measured at every stage transition
378- [ ] Event dictionary maintained — no undocumented events
379- [ ] PII audit complete — no personal data in event properties
380- [ ] Monthly tracking plan review on calendar
381 
382## Quality Check
383 
384Before delivering, verify:
385 
386- [ ] Output matches the user's stated request
387- [ ] Named frameworks or sources are reflected in the recommendation
388- [ ] The deliverable is specific enough for an agent to execute
389- [ ] Any assumptions, risks, or dependencies are explicit
390- [ ] No unsupported claims, invented facts, or private/internal references are included
391 
392## Common Pitfalls
393 
3941. **Tracking without a plan.** Events fire into the void. No one knows what
395 "button_clicked_3" means. The data is worthless. Fix: Tracking plan
396 document FIRST. Implementation second. Every event has a name, purpose,
397 properties, destinations, and owner.
398 
3992. **Client-side only.** Ad blockers block 15-30% of client-side tracking.
400 Critical events (signup, payment, subscription) are lost. Fix: Server-side
401 tracking for revenue-critical events. CDP server-side SDK.
402 
4033. **Duplicate events.** Segment fires "Signed Up." GTM also fires "SignUp."
404 GA4 shows 2x signups. Nobody knows which number is real. Fix: One source
405 of truth per event. Audit for duplicates. GTM ONLY handles marketing pixels,
406 not core events.
407 
4084. **Marketing and product tracking disconnected.** Marketing sees signups.
409 Product sees activation. Nobody connects the two — can't answer "which
410 marketing channel produces the most activated users?" Fix: Same event
411 taxonomy. Same user_id. CDP routes to both marketing and product tools.
412 
4135. **No attribution on signup.** UTM params captured on visit but lost on
414 signup. "Where did this customer come from?" = shrug. Fix: Capture UTM
415 params on first visit. Persist to user profile on signup. Always.
416 
4176. **PII in event properties.** `email: "[email protected]"` tracked in every
418 event. This is a privacy violation and a security risk. Fix: Use user_id.
419 Store PII in your database, not your event pipeline. Only `identify()` call
420 carries user traits — regular `track()` calls do not.
421 
422## Execution Artifacts
423 
424- `references/framework-notes.md` — named frameworks, citation anchors, and operating assumptions
425- `references/cdp-implementation.md` — CDP implementation patterns
426- `references/event-taxonomy.md` — Event naming and governance reference
427- `templates/output-template.md` — copy-paste deliverable structure for the user
428- `scripts/check-output.py` — local checklist validator for required sections
429This skill includes lightweight artifacts the agent can load on demand:
430Use the artifacts when the user asks for an implementation-ready deliverable, a repeatable workflow, or a quality check rather than generic advice.
431 
432## Related Skills
433 
434- `event-analytics` — Event taxonomy design, CDP architecture, event-driven GTM
435- `gtm-metrics` — SaaS metrics and benchmarks
436- `campaign-analytics` — Campaign performance, 6-layer metrics stack
437- `1p-tagging-pixels` — First-party pixel implementation
438- `attribution` — Multi-touch attribution models
439- `a-b-testing` — Experiment design and statistical significance
440- `cs-analytics-dashboards` — CS health scores and dashboards
441 

Discussion

Alternatives

Diagram designCreate branded architecture, architecture delta, IT current-state, flowchart, sequence, state machine, ER/data model, timeline, swimlane, quadrant, radar/spider, polar chart (polar/radial lollipop), loop/flywheel, nested, tree, org chart, layer stack, Venn, pyramid/funnel, treemap and marimekko, heatmap, bar and dumbbell, waterfall, line (slopegraph, ridgeline, streamgraph, bump), Gantt and scatter charts (bubble, beeswarm), high-level, process, medallion, data flow, DP integration, DP security matrix, Sankey, fishbone, Wardley map, kanban, user journey, deployment, dependency graph, UML class, story map, or database schema diagrams as HTML/SVG/PNG, with .drawio, Mermaid, and .excalidraw import, plus lifecycle phase maps, block decomposition trees, and onboarding guidance.Coding · MITReview architectureReview a PR against the Pascal architectural rules — package boundaries (core/viewer/editor/nodes), the registry-driven composition model (def.geometry / def.renderer / def.system), legacy-dispatch regressions, the slots + world-scale-UV convention for new nodes/geometry, hook hygiene (useEditor/useScene/useViewer), and selector performance. Use when the user asks to review a PR, audit a branch, or check that changes respect the codebase's architecture.Coding · MITDraw.io Architecture StudioCreate and edit draw.io/diagrams.net diagrams as editable `.drawio` files. Covers architecture, UML/ERD/sequence, BPMN, network, and swimlane views authored from a description or converted from code, IaC, SQL, and API schemas, plus sync, query, test, review, export, and publish of existing diagrams. Use when the user asks for draw.io/diagrams.net or an editable diagram; prefer Mermaid/PlantUML when diagrams-as-code is enough.Coding · MITArchitecture Diagram SkillCreate polished dark-themed architecture diagrams as self-contained HTML+SVG files. Use when the user asks for system, infrastructure, cloud, security, or network topology diagrams.Coding · MIT