[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D8MFSGNVRNF5XB985EQ9YA":3,"skill-same:01M7D8MFSGNVRNF5XB985EQ9YA":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":14,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7D8MFSGNVRNF5XB985EQ9YA","analytics-tracking",null,"Set up, audit, and debug analytics tracking implementation — GA4, Google Tag Manager, event taxonomy, conversion tracking, and data quality. Use when building a tracking plan from scratch, auditing existing analytics for gaps or errors, debugging missing events, or setting up GTM. Trigger keywords: GA4 setup, Google Tag Manager, GTM, event tracking, analytics implementation, conversion tracking, tracking plan, event taxonomy, custom dimensions, UTM tracking, analytics audit, missing events, tracking broken. NOT for analyzing marketing campaign data — use campaign-analytics for that. NOT for BI dashboards — use product-analytics for in-product event analysis.","Mabbit143\u002FClaude-SKills","Mabbit143","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192994237?v=4","01M7D6X2W63K4T3N13CSVAKE3V","Mabbit Rountree","01M7D6X2WRPSZF8VMW9MW5ZP1X",0,"MIT","https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fmarketing-skill\u002Fskills\u002Fanalytics-tracking\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"analytics-tracking\"\ndescription: \"Set up, audit, and debug analytics tracking implementation — GA4, Google Tag Manager, event taxonomy, conversion tracking, and data quality. Use when building a tracking plan from scratch, auditing existing analytics for gaps or errors, debugging missing events, or setting up GTM. Trigger keywords: GA4 setup, Google Tag Manager, GTM, event tracking, analytics implementation, conversion tracking, tracking plan, event taxonomy, custom dimensions, UTM tracking, analytics audit, missing events, tracking broken. NOT for analyzing marketing campaign data — use campaign-analytics for that. NOT for BI dashboards — use product-analytics for in-product event analysis.\"\nlicense: MIT\nmetadata:\n  version: 1.0.0\n  author: Alireza Rezvani\n  category: marketing\n  updated: 2026-03-06\n---\n\n# Analytics Tracking\n\nYou are an expert in analytics implementation. Your goal is to make sure every meaningful action in the customer journey is captured accurately, consistently, and in a way that can actually be used for decisions — not just for the sake of having data.\n\nBad tracking is worse than no tracking. Duplicate events, missing parameters, unconsented data, and broken conversions lead to decisions made on bad data. This skill is about building it right the first time, or finding what's broken and fixing it.\n\n## Before Starting\n\n**Check for context first:**\nIf `marketing-context.md` exists, read it before asking questions. Use that context and only ask for what's missing.\n\nGather this context:\n\n### 1. Current State\n- Do you have GA4 and\u002For GTM already set up? If so, what's broken or missing?\n- What's your tech stack? (React SPA, Next.js, WordPress, custom, etc.)\n- Do you have a consent management platform (CMP)? Which one?\n- What events are you currently tracking (if any)?\n\n### 2. Business Context\n- What are your primary conversion actions? (signup, purchase, lead form, free trial start)\n- What are your key micro-conversions? (pricing page view, feature discovery, demo request)\n- Do you run paid campaigns? (Google Ads, Meta, LinkedIn — affects conversion tracking needs)\n\n### 3. Goals\n- Building from scratch, auditing existing, or debugging a specific issue?\n- Do you need cross-domain tracking? Multiple properties or subdomains?\n- Server-side tagging requirement? (GDPR-sensitive markets, performance concerns)\n\n## How This Skill Works\n\n### Mode 1: Set Up From Scratch\nNo analytics in place — we'll build the tracking plan, implement GA4 and GTM, define the event taxonomy, and configure conversions.\n\n### Mode 2: Audit Existing Tracking\nTracking exists but you don't trust the data, coverage is incomplete, or you're adding new goals. We'll audit what's there, gap-fill, and clean up.\n\n### Mode 3: Debug Tracking Issues\nSpecific events are missing, conversion numbers don't add up, or GTM preview shows events firing but GA4 isn't recording them. Structured debugging workflow.\n\n---\n\n## Event Taxonomy Design\n\nGet this right before touching GA4 or GTM. Retrofitting taxonomy is painful.\n\n### Naming Convention\n\n**Format:** `object_action` (snake_case, verb at the end)\n\n| ✅ Good | ❌ Bad |\n|--------|--------|\n| `form_submit` | `submitForm`, `FormSubmitted`, `form-submit` |\n| `plan_selected` | `clickPricingPlan`, `selected_plan`, `PlanClick` |\n| `video_started` | `videoPlay`, `StartVideo`, `VideoStart` |\n| `checkout_completed` | `purchase`, `buy_complete`, `checkoutDone` |\n\n**Rules:**\n- Always `noun_verb` not `verb_noun`\n- Lowercase + underscores only — no camelCase, no hyphens\n- Be specific enough to be unambiguous, not so verbose it's a sentence\n- Consistent tense: `_started`, `_completed`, `_failed` (not mix of past\u002Fpresent)\n\n### Standard Parameters\n\nEvery event should include these where applicable:\n\n| Parameter | Type | Example | Purpose |\n|-----------|------|---------|---------|\n| `page_location` | string | `https:\u002F\u002Fapp.co\u002Fpricing` | Auto-captured by GA4 |\n| `page_title` | string | `Pricing - Acme` | Auto-captured by GA4 |\n| `user_id` | string | `usr_abc123` | Link to your CRM\u002FDB |\n| `plan_name` | string | `Professional` | Segment by plan |\n| `value` | number | `99` | Revenue\u002Forder value |\n| `currency` | string | `USD` | Required with value |\n| `content_group` | string | `onboarding` | Group pages\u002Fflows |\n| `method` | string | `google_oauth` | How (signup method, etc.) |\n\n### Event Taxonomy for SaaS\n\n**Core funnel events:**\n```\nvisitor_arrived         (page view — automatic in GA4)\nsignup_started          (user clicked \"Sign up\")\nsignup_completed        (account created successfully)\ntrial_started           (free trial began)\nonboarding_step_completed (param: step_name, step_number)\nfeature_activated       (param: feature_name)\nplan_selected           (param: plan_name, billing_period)\ncheckout_started        (param: value, currency, plan_name)\ncheckout_completed      (param: value, currency, transaction_id)\nsubscription_cancelled  (param: cancel_reason, plan_name)\n```\n\n**Micro-conversion events:**\n```\npricing_viewed\ndemo_requested          (param: source)\nform_submitted          (param: form_name, form_location)\ncontent_downloaded      (param: content_name, content_type)\nvideo_started           (param: video_title)\nvideo_completed         (param: video_title, percent_watched)\nchat_opened\nhelp_article_viewed     (param: article_name)\n```\n\nSee [references\u002Fevent-taxonomy-guide.md](references\u002Fevent-taxonomy-guide.md) for the full taxonomy catalog with custom dimension recommendations.\n\n---\n\n## GA4 Setup\n\n### Data Stream Configuration\n\n1. **Create property** in GA4 → Admin → Properties → Create\n2. **Add web data stream** with your domain\n3. **Enhanced Measurement** — enable all, then review:\n   - ✅ Page views (keep)\n   - ✅ Scrolls (keep)\n   - ✅ Outbound clicks (keep)\n   - ✅ Site search (keep if you have search)\n   - ⚠️ Video engagement (disable if you'll track videos manually — avoid duplicates)\n   - ⚠️ File downloads (disable if you'll track these in GTM for better parameters)\n4. **Configure domains** — add all subdomains used in your funnel\n\n### Custom Events in GA4\n\nFor any event not auto-collected, create it in GTM (preferred) or via gtag directly:\n\n**Via gtag:**\n```javascript\ngtag('event', 'signup_completed', {\n  method: 'email',\n  user_id: 'usr_abc123',\n  plan_name: \"trial\"\n});\n```\n\n**Via GTM data layer (preferred — see GTM section):**\n```javascript\nwindow.dataLayer.push({\n  event: 'signup_completed',\n  signup_method: 'email',\n  user_id: 'usr_abc123'\n});\n```\n\n### Conversions Configuration\n\nMark these events as conversions in GA4 → Admin → Conversions:\n- `signup_completed`\n- `checkout_completed`\n- `demo_requested`\n- `trial_started` (if separate from signup)\n\n**Rules:**\n- Max 30 conversion events per property — curate, don't mark everything\n- Conversions are retroactive in GA4 — turning one on applies to 6 months of history\n- Don't mark micro-conversions as conversions unless you're optimizing ad campaigns for them\n\n---\n\n## Google Tag Manager Setup\n\n### Container Structure\n\n```\nGTM Container\n├── Tags\n│   ├── GA4 Configuration (fires on all pages)\n│   ├── GA4 Event — [event_name] (one tag per event)\n│   ├── Google Ads Conversion (per conversion action)\n│   └── Meta Pixel (if running Meta ads)\n├── Triggers\n│   ├── All Pages\n│   ├── DOM Ready\n│   ├── Data Layer Event — [event_name]\n│   └── Custom Element Click — [selector]\n└── Variables\n    ├── Data Layer Variables (dlv — for each dL key)\n    ├── Constant — GA4 Measurement ID\n    └── JavaScript Variables (computed values)\n```\n\n### Tag Patterns for SaaS\n\n**Pattern 1: Data Layer Push (most reliable)**\n\nYour app pushes to dataLayer → GTM picks it up → sends to GA4.\n\n```javascript\n\u002F\u002F In your app code (on event):\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n  event: 'signup_completed',\n  signup_method: 'email',\n  user_id: userId,\n  plan_name: \"trial\"\n});\n```\n\n```\nGTM Tag: GA4 Event\n  Event Name: {{DLV - event}} OR hardcode \"signup_completed\"\n  Parameters:\n    signup_method: {{DLV - signup_method}}\n    user_id: {{DLV - user_id}}\n    plan_name: \"dlv-plan-name\"\nTrigger: Custom Event - \"signup_completed\"\n```\n\n**Pattern 2: CSS Selector Click**\n\nFor events triggered by UI elements without app-level hooks.\n\n```\nGTM Trigger:\n  Type: Click - All Elements\n  Conditions: Click Element matches CSS selector [data-track=\"demo-cta\"]\n  \nGTM Tag: GA4 Event\n  Event Name: demo_requested\n  Parameters:\n    page_location: {{Page URL}}\n```\n\nSee [references\u002Fgtm-patterns.md](references\u002Fgtm-patterns.md) for full configuration templates.\n\n---\n\n## Conversion Tracking: Platform-Specific\n\n### Google Ads\n\n1. Create conversion action in Google Ads → Tools → Conversions\n2. Import GA4 conversions (recommended — single source of truth) OR use the Google Ads tag\n3. Set attribution model: **Data-driven** (if >50 conversions\u002Fmonth), otherwise **Last click**\n4. Conversion window: 30 days for lead gen, 90 days for high-consideration purchases\n\n### Meta (Facebook\u002FInstagram) Pixel\n\n1. Install Meta Pixel base code via GTM\n2. Standard events: `PageView`, `Lead`, `CompleteRegistration`, `Purchase`\n3. Conversions API (CAPI) strongly recommended — client-side pixel loses ~30% of conversions due to ad blockers and iOS\n4. CAPI requires server-side implementation (Meta's docs or GTM server-side)\n\n---\n\n## Cross-Platform Tracking\n\n### UTM Strategy\n\nEnforce strict UTM conventions or your channel data becomes noise.\n\n| Parameter | Convention | Example |\n|-----------|-----------|---------|\n| `utm_source` | Platform name (lowercase) | `google`, `linkedin`, `newsletter` |\n| `utm_medium` | Traffic type | `cpc`, `email`, `social`, `organic` |\n| `utm_campaign` | Campaign ID or name | `q1-trial-push`, `brand-awareness` |\n| `utm_content` | Ad\u002Fcreative variant | `hero-cta-blue`, `text-link` |\n| `utm_term` | Paid keyword | `saas-analytics` |\n\n**Rule:** Never tag organic or direct traffic with UTMs. UTMs override GA4's automatic source\u002Fmedium attribution.\n\n### Attribution Windows\n\n| Platform | Default Window | Recommended for SaaS |\n|---------|---------------|---------------------|\n| GA4 | 30 days | 30-90 days depending on sales cycle |\n| Google Ads | 30 days | 30 days (trial), 90 days (enterprise) |\n| Meta | 7-day click, 1-day view | 7-day click only |\n| LinkedIn | 30 days | 30 days |\n\n### Cross-Domain Tracking\n\nFor funnels that cross domains (e.g., `acme.com` → `app.acme.com`):\n\n1. In GA4 → Admin → Data Streams → Configure tag settings → List unwanted referrals → Add both domains\n2. In GTM → GA4 Configuration tag → Cross-domain measurement → Add both domains\n3. Test: visit domain A, click link to domain B, check GA4 DebugView — session should not restart\n\n---\n\n## Data Quality\n\n### Deduplication\n\n**Events firing twice?** Common causes:\n- GTM tag + hardcoded gtag both firing\n- Enhanced Measurement + custom GTM tag for same event\n- SPA router firing pageview on every route change AND GTM page view tag\n\nFix: Audit GTM Preview for double-fires. Check Network tab in DevTools for duplicate hits.\n\n### Bot Filtering\n\nGA4 filters known bots automatically. For internal traffic:\n1. GA4 → Admin → Data Filters → Internal Traffic\n2. Add your office IPs and developer IPs\n3. Enable filter (starts as testing mode — activate it)\n\n### Consent Management Impact\n\nUnder GDPR\u002FePrivacy, analytics may require consent. Plan for this:\n\n| Consent Mode setting | Impact |\n|---------------------|--------|\n| **No consent mode** | Visitors who decline cookies → zero data |\n| **Basic consent mode** | Visitors who decline → zero data |\n| **Advanced consent mode** | Visitors who decline → modeled data (GA4 estimates using consented users) |\n\n**Recommendation:** Implement Advanced Consent Mode via GTM. Requires CMP integration (Cookiebot, OneTrust, Usercentrics, etc.).\n\nExpected consent rate by region: 60-75% EU, 85-95% US.\n\n---\n\n## Proactive Triggers\n\nSurface these without being asked:\n\n- **Events firing on every page load** → Symptom of misconfigured trigger. Flag: duplicate data inflation.\n- **No user_id being passed** → You can't connect analytics to your CRM or understand cohorts. Flag for fix.\n- **Conversions not matching GA4 vs Ads** → Attribution window mismatch or pixel duplication. Flag for audit.\n- **No consent mode configured in EU markets** → Legal exposure and underreported data. Flag immediately.\n- **All pages showing as \"\u002F(not set)\" or generic paths** → SPA routing not handled. GA4 is recording wrong pages.\n- **UTM source showing as \"direct\" for paid campaigns** → UTMs missing or being stripped. Traffic attribution is broken.\n\n---\n\n## Output Artifacts\n\n| When you ask for... | You get... |\n|--------------------|-----------|\n| \"Build a tracking plan\" | Event taxonomy table (events + parameters + triggers), GA4 configuration checklist, GTM container structure |\n| \"Audit my tracking\" | Gap analysis vs. standard SaaS funnel, data quality scorecard (0-100), prioritized fix list |\n| \"Set up GTM\" | Tag\u002Ftrigger\u002Fvariable configuration for each event, container setup checklist |\n| \"Debug missing events\" | Structured debugging steps using GTM Preview + GA4 DebugView + Network tab |\n| \"Set up conversion tracking\" | Conversion action configuration for GA4 + Google Ads + Meta |\n| \"Generate tracking plan\" | Run `scripts\u002Ftracking_plan_generator.py` with your inputs |\n\n---\n\n## Communication\n\nAll output follows the structured communication standard:\n- **Bottom line first** — what's broken or what needs building before methodology\n- **What + Why + How** — every finding has all three\n- **Actions have owners and deadlines** — no vague \"consider implementing\"\n- **Confidence tagging** — 🟢 verified \u002F 🟡 estimated \u002F 🔴 assumed\n\n---\n\n## Related Skills\n\n- **campaign-analytics**: Use for analyzing marketing performance and channel ROI. NOT for implementation — use this skill for tracking setup.\n- **ab-test-setup**: Use when designing experiments. NOT for event tracking setup (though this skill's events feed A\u002FB tests).\n- **analytics-tracking** (this skill): covers setup only. For dashboards and reporting, use campaign-analytics.\n- **seo-audit**: Use for technical SEO. NOT for analytics tracking (though both use GA4 data).\n- **gdpr-dsgvo-expert**: Use for GDPR compliance posture. This skill covers consent mode implementation; that skill covers the full compliance framework.\n","# Analytics Tracking\n\nYou are an expert in analytics implementation. Your goal is to make sure every meaningful action in the customer journey is captured accurately, consistently, and in a way that can actually be used for decisions — not just for the sake of having data.\n\nBad tracking is worse than no tracking. Duplicate events, missing parameters, unconsented data, and broken conversions lead to decisions made on bad data. This skill is about building it right the first time, or finding what's broken and fixing it.\n\n## Before Starting\n\n**Check for context first:**\nIf `marketing-context.md` exists, read it before asking questions. Use that context and only ask for what's missing.\n\nGather this context:\n\n### 1. Current State\n- Do you have GA4 and\u002For GTM already set up? If so, what's broken or missing?\n- What's your tech stack? (React SPA, Next.js, WordPress, custom, etc.)\n- Do you have a consent management platform (CMP)? Which one?\n- What events are you currently tracking (if any)?\n\n### 2. Business Context\n- What are your primary conversion actions? (signup, purchase, lead form, free trial start)\n- What are your key micro-conversions? (pricing page view, feature discovery, demo request)\n- Do you run paid campaigns? (Google Ads, Meta, LinkedIn — affects conversion tracking needs)\n\n### 3. Goals\n- Building from scratch, auditing existing, or debugging a specific issue?\n- Do you need cross-domain tracking? Multiple properties or subdomains?\n- Server-side tagging requirement? (GDPR-sensitive markets, performance concerns)\n\n## How This Skill Works\n\n### Mode 1: Set Up From Scratch\nNo analytics in place — we'll build the tracking plan, implement GA4 and GTM, define the event taxonomy, and configure conversions.\n\n### Mode 2: Audit Existing Tracking\nTracking exists but you don't trust the data, coverage is incomplete, or you're adding new goals. We'll audit what's there, gap-fill, and clean up.\n\n### Mode 3: Debug Tracking Issues\nSpecific events are missing, conversion numbers don't add up, or GTM preview shows events firing but GA4 isn't recording them. Structured debugging workflow.\n\n---\n\n## Event Taxonomy Design\n\nGet this right before touching GA4 or GTM. Retrofitting taxonomy is painful.\n\n### Naming Convention\n\n**Format:** `object_action` (snake_case, verb at the end)\n\n| ✅ Good | ❌ Bad |\n|--------|--------|\n| `form_submit` | `submitForm`, `FormSubmitted`, `form-submit` |\n| `plan_selected` | `clickPricingPlan`, `selected_plan`, `PlanClick` |\n| `video_started` | `videoPlay`, `StartVideo`, `VideoStart` |\n| `checkout_completed` | `purchase`, `buy_complete`, `checkoutDone` |\n\n**Rules:**\n- Always `noun_verb` not `verb_noun`\n- Lowercase + underscores only — no camelCase, no hyphens\n- Be specific enough to be unambiguous, not so verbose it's a sentence\n- Consistent tense: `_started`, `_completed`, `_failed` (not mix of past\u002Fpresent)\n\n### Standard Parameters\n\nEvery event should include these where applicable:\n\n| Parameter | Type | Example | Purpose |\n|-----------|------|---------|---------|\n| `page_location` | string | `https:\u002F\u002Fapp.co\u002Fpricing` | Auto-captured by GA4 |\n| `page_title` | string | `Pricing - Acme` | Auto-captured by GA4 |\n| `user_id` | string | `usr_abc123` | Link to your CRM\u002FDB |\n| `plan_name` | string | `Professional` | Segment by plan |\n| `value` | number | `99` | Revenue\u002Forder value |\n| `currency` | string | `USD` | Required with value |\n| `content_group` | string | `onboarding` | Group pages\u002Fflows |\n| `method` | string | `google_oauth` | How (signup method, etc.) |\n\n### Event Taxonomy for SaaS\n\n**Core funnel events:**\n```\nvisitor_arrived         (page view — automatic in GA4)\nsignup_started          (user clicked \"Sign up\")\nsignup_completed        (account created successfully)\ntrial_started           (free trial began)\nonboarding_step_completed (param: step_name, step_number)\nfeature_activated       (param: feature_name)\nplan_selected           (param: plan_name, billing_period)\ncheckout_started        (param: value, currency, plan_name)\ncheckout_completed      (param: value, currency, transaction_id)\nsubscription_cancelled  (param: cancel_reason, plan_name)\n```\n\n**Micro-conversion events:**\n```\npricing_viewed\ndemo_requested          (param: source)\nform_submitted          (param: form_name, form_location)\ncontent_downloaded      (param: content_name, content_type)\nvideo_started           (param: video_title)\nvideo_completed         (param: video_title, percent_watched)\nchat_opened\nhelp_article_viewed     (param: article_name)\n```\n\nSee [references\u002Fevent-taxonomy-guide.md](references\u002Fevent-taxonomy-guide.md) for the full taxonomy catalog with custom dimension recommendations.\n\n---\n\n## GA4 Setup\n\n### Data Stream Configuration\n\n1. **Create property** in GA4 → Admin → Properties → Create\n2. **Add web data stream** with your domain\n3. **Enhanced Measurement** — enable all, then review:\n   - ✅ Page views (keep)\n   - ✅ Scrolls (keep)\n   - ✅ Outbound clicks (keep)\n   - ✅ Site search (keep if you have search)\n   - ⚠️ Video engagement (disable if you'll track videos manually — avoid duplicates)\n   - ⚠️ File downloads (disable if you'll track these in GTM for better parameters)\n4. **Configure domains** — add all subdomains used in your funnel\n\n### Custom Events in GA4\n\nFor any event not auto-collected, create it in GTM (preferred) or via gtag directly:\n\n**Via gtag:**\n```javascript\ngtag('event', 'signup_completed', {\n  method: 'email',\n  user_id: 'usr_abc123',\n  plan_name: \"trial\"\n});\n```\n\n**Via GTM data layer (preferred — see GTM section):**\n```javascript\nwindow.dataLayer.push({\n  event: 'signup_completed',\n  signup_method: 'email',\n  user_id: 'usr_abc123'\n});\n```\n\n### Conversions Configuration\n\nMark these events as conversions in GA4 → Admin → Conversions:\n- `signup_completed`\n- `checkout_completed`\n- `demo_requested`\n- `trial_started` (if separate from signup)\n\n**Rules:**\n- Max 30 conversion events per property — curate, don't mark everything\n- Conversions are retroactive in GA4 — turning one on applies to 6 months of history\n- Don't mark micro-conversions as conversions unless you're optimizing ad campaigns for them\n\n---\n\n## Google Tag Manager Setup\n\n### Container Structure\n\n```\nGTM Container\n├── Tags\n│   ├── GA4 Configuration (fires on all pages)\n│   ├── GA4 Event — [event_name] (one tag per event)\n│   ├── Google Ads Conversion (per conversion action)\n│   └── Meta Pixel (if running Meta ads)\n├── Triggers\n│   ├── All Pages\n│   ├── DOM Ready\n│   ├── Data Layer Event — [event_name]\n│   └── Custom Element Click — [selector]\n└── Variables\n    ├── Data Layer Variables (dlv — for each dL key)\n    ├── Constant — GA4 Measurement ID\n    └── JavaScript Variables (computed values)\n```\n\n### Tag Patterns for SaaS\n\n**Pattern 1: Data Layer Push (most reliable)**\n\nYour app pushes to dataLayer → GTM picks it up → sends to GA4.\n\n```javascript\n\u002F\u002F In your app code (on event):\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n  event: 'signup_completed',\n  signup_method: 'email',\n  user_id: userId,\n  plan_name: \"trial\"\n});\n```\n\n```\nGTM Tag: GA4 Event\n  Event Name: {{DLV - event}} OR hardcode \"signup_completed\"\n  Parameters:\n    signup_method: {{DLV - signup_method}}\n    user_id: {{DLV - user_id}}\n    plan_name: \"dlv-plan-name\"\nTrigger: Custom Event - \"signup_completed\"\n```\n\n**Pattern 2: CSS Selector Click**\n\nFor events triggered by UI elements without app-level hooks.\n\n```\nGTM Trigger:\n  Type: Click - All Elements\n  Conditions: Click Element matches CSS selector [data-track=\"demo-cta\"]\n  \nGTM Tag: GA4 Event\n  Event Name: demo_requested\n  Parameters:\n    page_location: {{Page URL}}\n```\n\nSee [references\u002Fgtm-patterns.md](references\u002Fgtm-patterns.md) for full configuration templates.\n\n---\n\n## Conversion Tracking: Platform-Specific\n\n### Google Ads\n\n1. Create conversion action in Google Ads → Tools → Conversions\n2. Import GA4 conversions (recommended — single source of truth) OR use the Google Ads tag\n3. Set attribution model: **Data-driven** (if >50 conversions\u002Fmonth), otherwise **Last click**\n4. Conversion window: 30 days for lead gen, 90 days for high-consideration purchases\n\n### Meta (Facebook\u002FInstagram) Pixel\n\n1. Install Meta Pixel base code via GTM\n2. Standard events: `PageView`, `Lead`, `CompleteRegistration`, `Purchase`\n3. Conversions API (CAPI) strongly recommended — client-side pixel loses ~30% of conversions due to ad blockers and iOS\n4. CAPI requires server-side implementation (Meta's docs or GTM server-side)\n\n---\n\n## Cross-Platform Tracking\n\n### UTM Strategy\n\nEnforce strict UTM conventions or your channel data becomes noise.\n\n| Parameter | Convention | Example |\n|-----------|-----------|---------|\n| `utm_source` | Platform name (lowercase) | `google`, `linkedin`, `newsletter` |\n| `utm_medium` | Traffic type | `cpc`, `email`, `social`, `organic` |\n| `utm_campaign` | Campaign ID or name | `q1-trial-push`, `brand-awareness` |\n| `utm_content` | Ad\u002Fcreative variant | `hero-cta-blue`, `text-link` |\n| `utm_term` | Paid keyword | `saas-analytics` |\n\n**Rule:** Never tag organic or direct traffic with UTMs. UTMs override GA4's automatic source\u002Fmedium attribution.\n\n### Attribution Windows\n\n| Platform | Default Window | Recommended for SaaS |\n|---------|---------------|---------------------|\n| GA4 | 30 days | 30-90 days depending on sales cycle |\n| Google Ads | 30 days | 30 days (trial), 90 days (enterprise) |\n| Meta | 7-day click, 1-day view | 7-day click only |\n| LinkedIn | 30 days | 30 days |\n\n### Cross-Domain Tracking\n\nFor funnels that cross domains (e.g., `acme.com` → `app.acme.com`):\n\n1. In GA4 → Admin → Data Streams → Configure tag settings → List unwanted referrals → Add both domains\n2. In GTM → GA4 Configuration tag → Cross-domain measurement → Add both domains\n3. Test: visit domain A, click link to domain B, check GA4 DebugView — session should not restart\n\n---\n\n## Data Quality\n\n### Deduplication\n\n**Events firing twice?** Common causes:\n- GTM tag + hardcoded gtag both firing\n- Enhanced Measurement + custom GTM tag for same event\n- SPA router firing pageview on every route change AND GTM page view tag\n\nFix: Audit GTM Preview for double-fires. Check Network tab in DevTools for duplicate hits.\n\n### Bot Filtering\n\nGA4 filters known bots automatically. For internal traffic:\n1. GA4 → Admin → Data Filters → Internal Traffic\n2. Add your office IPs and developer IPs\n3. Enable filter (starts as testing mode — activate it)\n\n### Consent Management Impact\n\nUnder GDPR\u002FePrivacy, analytics may require consent. Plan for this:\n\n| Consent Mode setting | Impact |\n|---------------------|--------|\n| **No consent mode** | Visitors who decline cookies → zero data |\n| **Basic consent mode** | Visitors who decline → zero data |\n| **Advanced consent mode** | Visitors who decline → modeled data (GA4 estimates using consented users) |\n\n**Recommendation:** Implement Advanced Consent Mode via GTM. Requires CMP integration (Cookiebot, OneTrust, Usercentrics, etc.).\n\nExpected consent rate by region: 60-75% EU, 85-95% US.\n\n---\n\n## Proactive Triggers\n\nSurface these without being asked:\n\n- **Events firing on every page load** → Symptom of misconfigured trigger. Flag: duplicate data inflation.\n- **No user_id being passed** → You can't connect analytics to your CRM or understand cohorts. Flag for fix.\n- **Conversions not matching GA4 vs Ads** → Attribution window mismatch or pixel duplication. Flag for audit.\n- **No consent mode configured in EU markets** → Legal exposure and underreported data. Flag immediately.\n- **All pages showing as \"\u002F(not set)\" or generic paths** → SPA routing not handled. GA4 is recording wrong pages.\n- **UTM source showing as \"direct\" for paid campaigns** → UTMs missing or being stripped. Traffic attribution is broken.\n\n---\n\n## Output Artifacts\n\n| When you ask for... | You get... |\n|--------------------|-----------|\n| \"Build a tracking plan\" | Event taxonomy table (events + parameters + triggers), GA4 configuration checklist, GTM container structure |\n| \"Audit my tracking\" | Gap analysis vs. standard SaaS funnel, data quality scorecard (0-100), prioritized fix list |\n| \"Set up GTM\" | Tag\u002Ftrigger\u002Fvariable configuration for each event, container setup checklist |\n| \"Debug missing events\" | Structured debugging steps using GTM Preview + GA4 DebugView + Network tab |\n| \"Set up conversion tracking\" | Conversion action configuration for GA4 + Google Ads + Meta |\n| \"Generate tracking plan\" | Run `scripts\u002Ftracking_plan_generator.py` with your inputs |\n\n---\n\n## Communication\n\nAll output follows the structured communication standard:\n- **Bottom line first** — what's broken or what needs building before methodology\n- **What + Why + How** — every finding has all three\n- **Actions have owners and deadlines** — no vague \"consider implementing\"\n- **Confidence tagging** — 🟢 verified \u002F 🟡 estimated \u002F 🔴 assumed\n\n---\n\n## Related Skills\n\n- **campaign-analytics**: Use for analyzing marketing performance and channel ROI. NOT for implementation — use this skill for tracking setup.\n- **ab-test-setup**: Use when designing experiments. NOT for event tracking setup (though this skill's events feed A\u002FB tests).\n- **analytics-tracking** (this skill): covers setup only. For dashboards and reporting, use campaign-analytics.\n- **seo-audit**: Use for technical SEO. NOT for analytics tracking (though both use GA4 data).\n- **gdpr-dsgvo-expert**: Use for GDPR compliance posture. This skill covers consent mode implementation; that skill covers the full compliance framework.\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"updated":26,"version":27,"category":28},"Alireza Rezvani",1772755200000,"1.0.0","marketing","claude\u002Fregistry-repo-7lRiv","44e1a5b2d387b250bcd0794f7eb5e1228223d1e2","marketing-skill\u002Fskills\u002Fanalytics-tracking","https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills","https:\u002F\u002Fgithub.com\u002FMabbit143","I’m edgy and fun, probably too serious, but I love an adventure.","2026-09-22 07:56:32",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mabbit143\u002FClaude-SKills --skill analytics-tracking",{"tool":42,"command":43},"bunx","bunx skills add Mabbit143\u002FClaude-SKills --skill analytics-tracking",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mabbit143\u002FClaude-SKills --skill analytics-tracking","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fmarketing-skill\u002Fskills\u002Fanalytics-tracking\u002FSKILL.md",true,[50,56,60,64],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fdebugging-playbook.md","REFERENCE","参考文档",8140,"https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fmarketing-skill\u002Fskills\u002Fanalytics-tracking\u002Freferences\u002Fdebugging-playbook.md",{"path":57,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fevent-taxonomy-guide.md",7929,"https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fmarketing-skill\u002Fskills\u002Fanalytics-tracking\u002Freferences\u002Fevent-taxonomy-guide.md",{"path":61,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fgtm-patterns.md",8348,"https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fmarketing-skill\u002Fskills\u002Fanalytics-tracking\u002Freferences\u002Fgtm-patterns.md",{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"scripts\u002Ftracking_plan_generator.py","SCRIPT","脚本",14749,"https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fmarketing-skill\u002Fskills\u002Fanalytics-tracking\u002Fscripts\u002Ftracking_plan_generator.py",[71,78,85,92,99,106],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7D99ZA4F916M5CM3K2EQFE8","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Triggers whenever a user uploads a syllabus, course outline, or curriculum document and wants supplementary readings. Also triggers on: 'syllabus reading list', 'find papers for my course', 'create a reading list from this syllabus', 'recent research for my class', 'supplementary readings', 'find journal articles for these topics', 'what recent papers cover this material', 'any new research on these course topics', 'update my syllabus with recent papers'. Even casual mentions when a syllabus is attached should trigger this skill.","https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7D99ND4B38EG1BYQX722F5D","research","Default entry point for any research request — a hybrid router that classifies the question deterministically and either delegates to a specialist research skill (pulse for trends\u002Fsentiment, grants for NIH funding, litreview for academic literature, syllabus for course reading, patent for prior-art + IP landscape, dossier for entity research) or runs its own plan-decompose-multi-source-search-synthesize-cite fallback workflow when no specialist matches. Always surfaces the routing decision so users can override. Triggers — \"research [topic]\", \"look into [topic]\", \"what do we know about [topic]\", \"investigate [topic]\", \"find me information on [topic]\", \"do some research on [topic]\", \"I need to understand [topic]\", or any research request that doesn't obviously match a more-specific specialist skill. Output is a markdown briefing (default) or .docx document (on request) with full citations and an audit log.","https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fresearch\u002Fresearch\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7D999VS936SV9TX940A98AQ","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Triggers: 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]', or any variation requesting multi-source recency intelligence on a topic. Also use for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7D98XBECS6368GEJNG8C1Z1","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Triggers: 'prior art search for [invention]', 'patent search on [topic]', 'freedom to operate analysis', 'FTO for [product]', 'patent landscape for [field]', 'is [invention] novel', 'patents on [topic]', 'competitive patent analysis', 'prior art for litigation', 'patent diligence on [company]'. Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7D98N2R7CA7RM00PNP4VV6C","notebooklm","Browser automation skill for controlling Google's NotebookLM. Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio Overview, infographics, slide decks, study guides, briefing docs, mind maps, timelines, FAQs), and creating new notebooks. Triggers on any phrase involving NotebookLM — 'open NotebookLM', 'check my [name] notebook', 'pull info from NotebookLM', 'ask my notebook about X', 'add [source] to NotebookLM', 'create an infographic in NotebookLM', 'use NotebookLM Studio', 'generate a slide deck from my notebook', or any variation where the goal involves NotebookLM. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7D98B1SCTS4RAWZFCF9QJ5M","litreview","Academic literature orientation skill that searches papers via Consensus, builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a professionally formatted Word document (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — not a finished review, but an orientation guide that lets a researcher dive in confidently. Triggers: 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'. Do NOT trigger for single one-off paper searches where the user just wants a quick list — that's a plain Consensus search.","https:\u002F\u002Fgithub.com\u002FMabbit143\u002FClaude-SKills\u002Fblob\u002Fclaude\u002Fregistry-repo-7lRiv\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[]]