Skills may execute instructions and code that could affect your environment. Marketplace scans reduce risk but do not guarantee safety. Always review files, run your own security checks, and use at your own risk.
analytics-tracking
Security Scan Summary
Status: Safe
Source: Syntic Skills registry
Automated security scan completed with no high-risk patterns detected. Manual review is still required.
About This Skill
Use when building a tracking plan, auditing GA4/GTM for gaps, debugging missing events, or setting up conversion tracking and event taxonomy.
Downloadable SKILL.md
Download SKILL.md and place it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review contents, and run in a controlled environment first. Acknowledge the risk notice above to enable the download.
---
name: analytics-tracking
description: Use when building a tracking plan, auditing GA4/GTM for gaps, debugging missing events, or setting up conversion tracking and event taxonomy.
category: Marketing
version: 1.0.0
tools: []
---
# Analytics Tracking
Set up, audit, and debug analytics implementation — GA4, Google Tag Manager, event taxonomy, conversion tracking, and data quality. Every meaningful action in the customer journey should be captured accurately, consistently, and usably. Bad tracking (duplicate events, missing parameters, unconsented data, broken conversions) is worse than no tracking — it drives decisions off bad data.
## Before Starting
Search the Knowledge Base for existing marketing/product context (brand voice, audience, current tracking setup) before asking questions; only ask for what's missing.
Gather:
**Current State** — GA4/GTM already set up, and what's broken or missing? Tech stack (React SPA, Next.js, WordPress, custom)? Consent management platform (CMP), and which one? Events currently tracked, if any?
**Business Context** — Primary conversion actions (signup, purchase, lead form, trial start)? Key micro-conversions (pricing page view, feature discovery, demo request)? Paid campaigns running (Google Ads, Meta, LinkedIn)?
**Goals** — Building from scratch, auditing, or debugging a specific issue? Cross-domain tracking needed, multiple properties or subdomains? Server-side tagging required (GDPR-sensitive markets, performance)?
## Three Modes
1. **Set up from scratch** — build the tracking plan, define the event taxonomy, plan GA4/GTM implementation, configure key events.
2. **Audit existing tracking** — tracking exists but isn't trusted or complete; audit, gap-fill, clean up.
3. **Debug tracking issues** — events missing, conversion numbers don't add up, GTM preview fires but GA4 doesn't record. Structured debugging.
---
## Event Taxonomy Design
Get this right before touching GA4 or GTM — retrofitting taxonomy later is painful.
**Naming convention:** `object_action`, snake_case, verb at the end. Good: `form_submit`, `plan_selected`, `video_started`, `checkout_completed`. Bad: `submitForm`, `clickPricingPlan`, `videoPlay`, `buy_complete`. Rules: always noun_verb not verb_noun; lowercase + underscores only, no camelCase or hyphens; specific but not sentence-length; consistent tense (`_started`, `_completed`, `_failed`, never a mix).
**Standard parameters** every event should carry where applicable: `page_location`, `page_title` (auto-captured by GA4), `user_id` (links to CRM/DB), `plan_name`, `value` + `currency` (revenue), `content_group`, `method` (e.g. signup method).
**Core SaaS funnel events:** visitor_arrived, signup_started, signup_completed, trial_started, onboarding_step_completed (params: step_name, step_number), feature_activated (param: feature_name), plan_selected (params: plan_name, billing_period), checkout_started/checkout_completed (params: value, currency, transaction_id), subscription_cancelled (params: cancel_reason, plan_name).
**Micro-conversion events:** pricing_viewed, demo_requested (param: source), form_submitted (params: form_name, form_location), content_downloaded, video_started/video_completed (params: video_title, percent_watched), chat_opened, help_article_viewed.
---
## GA4 Setup
**Data stream:** create the property, add a web data stream, enable Enhanced Measurement (keep page views/scrolls/outbound clicks/site search; disable video engagement and file downloads if you'll track those manually via GTM, to avoid duplicates), then configure every subdomain used in the funnel.
**Custom events:** prefer a GTM data-layer push over hardcoding gtag calls in the app — e.g. push `{event: 'signup_completed', signup_method: 'email', user_id: userId}` to `window.dataLayer`, and let GTM forward it to GA4.
**Key events** (GA4 renamed "Conversions" to "Key events" in March 2024 — "conversions" now refers only to Google Ads conversion actions): mark signup_completed, checkout_completed, demo_requested, and trial_started (if separate from signup) as key events. Max 30 key events per property — curate, don't mark everything. Key events are retroactive, applying to 6 months of history when turned on. Don't mark micro-conversions as key events unless you're also optimizing ad campaigns for them.
## Google Tag Manager Setup
Container structure: **Tags** (GA4 Configuration firing on all pages, one GA4 Event tag per event, a Google Ads Conversion tag per action, Meta Pixel if running Meta ads), **Triggers** (All Pages, DOM Ready, a Data Layer Event trigger per event, Custom Element Click triggers per selector), **Variables** (a Data Layer Variable per dataLayer key, a Constant for the GA4 Measurement ID, JS Variables for computed values).
**Pattern 1 — Data Layer Push (most reliable):** the app pushes to `dataLayer`, GTM picks it up via a Custom Event trigger matching the event name, and forwards it to GA4 with the pushed parameters mapped to Data Layer Variables.
**Pattern 2 — CSS Selector Click:** for UI elements without app-level hooks, trigger on Click - All Elements matching a `[data-track="..."]` selector, and fire a GA4 Event tag with the page location as a parameter.
## Conversion Tracking
**Google Ads:** create the conversion action, then import GA4 conversions (recommended — single source of truth) or use the Google Ads tag directly. Attribution model: Data-driven if the account sees >50 conversions/month, otherwise Last click. Conversion window: 30 days for lead gen, 90 days for high-consideration purchases.
**Meta Pixel:** install the base code via GTM. Standard events: PageView, Lead, CompleteRegistration, Purchase. Conversions API (CAPI) is strongly recommended — the client-side pixel alone loses roughly 30% of conversions to ad blockers and iOS restrictions; CAPI requires a server-side implementation.
## Cross-Platform Tracking
**UTM strategy:** `utm_source` = platform name lowercase; `utm_medium` = traffic type (cpc, email, social, organic); `utm_campaign` = campaign id/name; `utm_content` = ad/creative variant; `utm_term` = paid keyword. Never tag organic or direct traffic with UTMs — they override GA4's automatic source/medium attribution.
**Attribution windows:** GA4 defaults to 30 days (recommend 30–90 for SaaS depending on sales cycle); Google Ads 30 days default (30 for trial, 90 for enterprise); Meta 7-day click / 1-day view (recommend 7-day click only); LinkedIn 30 days.
**Cross-domain tracking** (e.g. `acme.com` → `app.acme.com`): in GA4 Admin → Data Streams → Configure tag settings → List unwanted referrals, add both domains; in the GTM GA4 Configuration tag, add both domains under cross-domain measurement. Test by visiting domain A, clicking to domain B, and confirming in GA4 DebugView that the session does not restart.
## Data Quality
**Deduplication:** events firing twice usually trace to a GTM tag and a hardcoded gtag both firing, Enhanced Measurement overlapping a custom GTM tag for the same event, or an SPA router firing a pageview on every route change alongside a GTM page-view tag. Fix by auditing GTM Preview for double-fires and checking the browser Network tab for duplicate hits.
**Bot filtering:** GA4 filters known bots automatically. For internal traffic, add office and developer IPs under Admin → Data Filters → Internal Traffic and activate the filter — it starts in testing mode.
**Consent management:** under GDPR/ePrivacy, analytics may require consent. With no consent mode or basic consent mode, visitors who decline produce zero data; with Advanced Consent Mode, decliners produce modeled data (GA4 estimates from consented users). Recommend implementing Advanced Consent Mode via GTM integrated with a CMP (Cookiebot, OneTrust, Usercentrics). Expected consent rates: roughly 60–75% in the EU, 85–95% in the US.
## Proactive Flags
Surface these without being asked: events firing on every page load (duplicate data inflation from a misconfigured trigger); no user_id being passed (can't connect analytics to CRM or cohorts); GA4 vs. Ads conversion counts not matching (attribution window mismatch or pixel duplication); no consent mode configured in EU markets (legal exposure, underreported data); pages showing as "/(not set)" (SPA routing not handled, GA4 recording the wrong pages); UTM source showing "direct" for paid campaigns (UTMs missing or being stripped).
## Output Artifacts
Tracking plan → event taxonomy table (events, parameters, triggers) plus a GA4/GTM configuration checklist. Audit → gap analysis against the standard SaaS funnel, a data-quality scorecard (0–100), and a prioritized fix list. GTM setup → tag/trigger/variable configuration per event. Debug → structured steps using GTM Preview, GA4 DebugView, and the Network tab. Conversion tracking → configuration for GA4 plus Google Ads plus Meta.
## Communication
Bottom line first — what's broken or what needs building, ahead of methodology. Every finding states what, why, and how. Actions get owners and deadlines, never "consider implementing." Tag confidence on estimates: 🟢 verified / 🟡 estimated / 🔴 assumed.
## Related Work
Hand off to a campaign-analytics or reporting skill for analyzing marketing performance and channel ROI — this skill covers implementation only. Hand off to an experiment-design skill once events are instrumented and hypotheses are ready to test. Hand off to a technical-SEO skill for on-page and crawl issues outside tracking.
Bundle Download
Includes SKILL.md and bundled support files where provided. Risk acknowledgement is required.
Install Targets
Syntic App
- 1. Create a dedicated folder for this skill in your local skills library.
- 2. Place SKILL.md into that folder.
- 3. Restart Syntic and invoke this skill on matching tasks.
Syntic Code (CLI)
- 1. Save SKILL.md in your local Syntic Code skills directory.
- 2. Keep related files in the same skill folder.
- 3. Run in a safe environment and validate outputs.
Source
https://github.com/alirezarezvani/claude-skills/blob/main/marketing-skill/skills/analytics-tracking/SKILL.md
Open Source LinkRelated Skills
ab-test-setup
Use when the user wants to plan, design, or implement an A/B test or experiment — hypothesis, sample size...
Marketingaeo
Use when planning content for AI-first audiences, auditing E-E-A-T signals, tracking LLM citations, or...
Marketingapp-store-optimization
Use when the user asks about ASO, app store rankings, metadata, titles/descriptions, or visibility on Apple...
Marketingbrand-guidelines
Use when applying, documenting, or enforcing brand guidelines for color systems, typography, logo usage...