Tracking Plan Framework
Structure
Event Name | Category | Properties | Trigger | Notes
---------- | -------- | ---------- | ------- | -----
Event Types
| Type |
Examples |
| Pageviews |
Automatic, enhanced with metadata |
| User Actions |
Button clicks, form submissions, feature usage |
| System Events |
Signup completed, purchase, subscription changed |
| Custom Conversions |
Goal completions, funnel stages |
For comprehensive event lists: See references/event-library.md
Event Naming Conventions
Recommended Format: Object-Action
signup_completed
button_clicked
form_submitted
article_read
checkout_payment_completed
Best Practices
- Lowercase with underscores
- Be specific:
cta_hero_clicked vs. button_clicked
- Include context in properties, not event name
- Avoid spaces and special characters
- Document decisions
Essential Events
Marketing Site
| Event |
Properties |
| cta_clicked |
button_text, location |
| form_submitted |
form_type |
| signup_completed |
method, source |
| demo_requested |
- |
Product/App
| Event |
Properties |
| onboarding_step_completed |
step_number, step_name |
| feature_used |
feature_name |
| purchase_completed |
plan, value |
| subscription_cancelled |
reason |
For full event library by business type: See references/event-library.md
Event Properties
Standard Properties
| Category |
Properties |
| Page |
page_title, page_location, page_referrer |
| User |
user_id, user_type, account_id, plan_type |
| Campaign |
source, medium, campaign, content, term |
| Product |
product_id, product_name, category, price |
Best Practices
- Use consistent property names
- Include relevant context
- Don't duplicate automatic properties
- Avoid PII in properties
GA4 Implementation
Quick Setup
- Create GA4 property and data stream
- Install gtag.js or GTM
- Enable enhanced measurement
- Configure custom events
- Mark conversions in Admin
Custom Event Example
gtag('event', 'signup_completed', {
'method': 'email',
'plan': 'free'
});
For detailed GA4 implementation: See references/ga4-implementation.md
Google Tag Manager
Container Structure
| Component |
Purpose |
| Tags |
Code that executes (GA4, pixels) |
| Triggers |
When tags fire (page view, click) |
| Variables |
Dynamic values (click text, data layer) |
Data Layer Pattern
dataLayer.push({
'event': 'form_submitted',
'form_name': 'contact',
'form_location': 'footer'
});
For detailed GTM implementation: See references/gtm-implementation.md
UTM Parameter Strategy
Standard Parameters
| Parameter |
Purpose |
Example |
| utm_source |
Traffic source |
google, newsletter |
| utm_medium |
Marketing medium |
cpc, email, social |
| utm_campaign |
Campaign name |
spring_sale |
| utm_content |
Differentiate versions |
hero_cta |
| utm_term |
Paid search keywords |
running+shoes |
Naming Conventions
- Lowercase everything
- Use underscores or hyphens consistently
- Be specific but concise:
blog_footer_cta, not cta1
- Document all UTMs in a spreadsheet
Debugging and Validation
Testing Tools
| Tool |
Use For |
| GA4 DebugView |
Real-time event monitoring |
| GTM Preview Mode |
Test triggers before publish |
| Browser Extensions |
Tag Assistant, dataLayer Inspector |
Validation Checklist
Common Issues
| Issue |
Check |
| Events not firing |
Trigger config, GTM loaded |
| Wrong values |
Variable path, data layer structure |
| Duplicate events |
Multiple containers, trigger firing twice |
Privacy and Compliance
Considerations
- Cookie consent required in EU/UK/CA
- No PII in analytics properties
- Data retention settings
- User deletion capabilities
Implementation
- Use consent mode (wait for consent)
- IP anonymization
- Only collect what you need
- Integrate with consent management platform
Output Format
Tracking Plan Document
# [Site/Product] Tracking Plan
## Overview
- Tools: GA4, GTM
- Last updated: [Date]
## Events
| Event Name | Description | Properties | Trigger |
|------------|-------------|------------|---------|
| signup_completed | User completes signup | method, plan | Success page |
## Custom Dimensions
| Name | Scope | Parameter |
|------|-------|-----------|
| user_type | User | user_type |
## Conversions
| Conversion | Event | Counting |
|------------|-------|----------|
| Signup | signup_completed | Once per session |
Task-Specific Questions
- What tools are you using (GA4, Mixpanel, etc.)?
- What key actions do you want to track?
- What decisions will this data inform?
- Who implements - dev team or marketing?
- Are there privacy/consent requirements?
- What's already tracked?
Tool Integrations
For implementation, see the tools registry. Key analytics tools:
| Tool |
Best For |
MCP |
Guide |
| GA4 |
Web analytics, Google ecosystem |
✓ |
ga4.md |
| Mixpanel |
Product analytics, event tracking |
- |
mixpanel.md |
| Amplitude |
Product analytics, cohort analysis |
- |
amplitude.md |
| PostHog |
Open-source analytics, session replay |
- |
posthog.md |
| Segment |
Customer data platform, routing |
- |
segment.md |
Related Skills
- ab-test-setup: For experiment tracking
- seo-audit: For organic traffic analysis
- page-cro: For conversion optimization (uses this data)
- revops: For pipeline metrics, CRM tracking, and revenue attribution
1---2name: analytics-tracking3description: When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking plan," "how do I measure this," "track conversions," "attribution," "Mixpanel," "Segment," "are my events firing," or "analytics isn't working." Use this whenever someone asks how to know if something is working or wants to measure marketing results. For A/B test measurement, see ab-test-setup.4---56## Tracking Plan Framework78### Structure910```11Event Name | Category | Properties | Trigger | Notes12---------- | -------- | ---------- | ------- | -----13```1415### Event Types1617| Type | Examples |18|------|----------|19| Pageviews | Automatic, enhanced with metadata |20| User Actions | Button clicks, form submissions, feature usage |21| System Events | Signup completed, purchase, subscription changed |22| Custom Conversions | Goal completions, funnel stages |2324**For comprehensive event lists**: See [references/event-library.md](references/event-library.md)2526---2728## Event Naming Conventions2930### Recommended Format: Object-Action3132```33signup_completed34button_clicked35form_submitted36article_read37checkout_payment_completed38```3940### Best Practices41- Lowercase with underscores42- Be specific: `cta_hero_clicked` vs. `button_clicked`43- Include context in properties, not event name44- Avoid spaces and special characters45- Document decisions4647---4849## Essential Events5051### Marketing Site5253| Event | Properties |54|-------|------------|55| cta_clicked | button_text, location |56| form_submitted | form_type |57| signup_completed | method, source |58| demo_requested | - |5960### Product/App6162| Event | Properties |63|-------|------------|64| onboarding_step_completed | step_number, step_name |65| feature_used | feature_name |66| purchase_completed | plan, value |67| subscription_cancelled | reason |6869**For full event library by business type**: See [references/event-library.md](references/event-library.md)7071---7273## Event Properties7475### Standard Properties7677| Category | Properties |78|----------|------------|79| Page | page_title, page_location, page_referrer |80| User | user_id, user_type, account_id, plan_type |81| Campaign | source, medium, campaign, content, term |82| Product | product_id, product_name, category, price |8384### Best Practices85- Use consistent property names86- Include relevant context87- Don't duplicate automatic properties88- Avoid PII in properties8990---9192## GA4 Implementation9394### Quick Setup95961. Create GA4 property and data stream972. Install gtag.js or GTM983. Enable enhanced measurement994. Configure custom events1005. Mark conversions in Admin101102### Custom Event Example103104```javascript105gtag('event', 'signup_completed', {106 'method': 'email',107 'plan': 'free'108});109```110111**For detailed GA4 implementation**: See [references/ga4-implementation.md](references/ga4-implementation.md)112113---114115## Google Tag Manager116117### Container Structure118119| Component | Purpose |120|-----------|---------|121| Tags | Code that executes (GA4, pixels) |122| Triggers | When tags fire (page view, click) |123| Variables | Dynamic values (click text, data layer) |124125### Data Layer Pattern126127```javascript128dataLayer.push({129 'event': 'form_submitted',130 'form_name': 'contact',131 'form_location': 'footer'132});133```134135**For detailed GTM implementation**: See [references/gtm-implementation.md](references/gtm-implementation.md)136137---138139## UTM Parameter Strategy140141### Standard Parameters142143| Parameter | Purpose | Example |144|-----------|---------|---------|145| utm_source | Traffic source | google, newsletter |146| utm_medium | Marketing medium | cpc, email, social |147| utm_campaign | Campaign name | spring_sale |148| utm_content | Differentiate versions | hero_cta |149| utm_term | Paid search keywords | running+shoes |150151### Naming Conventions152- Lowercase everything153- Use underscores or hyphens consistently154- Be specific but concise: `blog_footer_cta`, not `cta1`155- Document all UTMs in a spreadsheet156157---158159## Debugging and Validation160161### Testing Tools162163| Tool | Use For |164|------|---------|165| GA4 DebugView | Real-time event monitoring |166| GTM Preview Mode | Test triggers before publish |167| Browser Extensions | Tag Assistant, dataLayer Inspector |168169### Validation Checklist170171- [ ] Events firing on correct triggers172- [ ] Property values populating correctly173- [ ] No duplicate events174- [ ] Works across browsers and mobile175- [ ] Conversions recorded correctly176- [ ] No PII leaking177178### Common Issues179180| Issue | Check |181|-------|-------|182| Events not firing | Trigger config, GTM loaded |183| Wrong values | Variable path, data layer structure |184| Duplicate events | Multiple containers, trigger firing twice |185186---187188## Privacy and Compliance189190### Considerations191- Cookie consent required in EU/UK/CA192- No PII in analytics properties193- Data retention settings194- User deletion capabilities195196### Implementation197- Use consent mode (wait for consent)198- IP anonymization199- Only collect what you need200- Integrate with consent management platform201202---203204## Output Format205206### Tracking Plan Document207208```markdown209# [Site/Product] Tracking Plan210211## Overview212- Tools: GA4, GTM213- Last updated: [Date]214215## Events216217| Event Name | Description | Properties | Trigger |218|------------|-------------|------------|---------|219| signup_completed | User completes signup | method, plan | Success page |220221## Custom Dimensions222223| Name | Scope | Parameter |224|------|-------|-----------|225| user_type | User | user_type |226227## Conversions228229| Conversion | Event | Counting |230|------------|-------|----------|231| Signup | signup_completed | Once per session |232```233234---235236## Task-Specific Questions2372381. What tools are you using (GA4, Mixpanel, etc.)?2392. What key actions do you want to track?2403. What decisions will this data inform?2414. Who implements - dev team or marketing?2425. Are there privacy/consent requirements?2436. What's already tracked?244245---246247## Tool Integrations248249For implementation, see the [tools registry](../../tools/REGISTRY.md). Key analytics tools:250251| Tool | Best For | MCP | Guide |252|------|----------|:---:|-------|253| **GA4** | Web analytics, Google ecosystem | ✓ | [ga4.md](../../tools/integrations/ga4.md) |254| **Mixpanel** | Product analytics, event tracking | - | [mixpanel.md](../../tools/integrations/mixpanel.md) |255| **Amplitude** | Product analytics, cohort analysis | - | [amplitude.md](../../tools/integrations/amplitude.md) |256| **PostHog** | Open-source analytics, session replay | - | [posthog.md](../../tools/integrations/posthog.md) |257| **Segment** | Customer data platform, routing | - | [segment.md](../../tools/integrations/segment.md) |258259---260261## Related Skills262263- **ab-test-setup**: For experiment tracking264- **seo-audit**: For organic traffic analysis265- **page-cro**: For conversion optimization (uses this data)266- **revops**: For pipeline metrics, CRM tracking, and revenue attribution