
Analytics Tracking
Set up, audit, or fix GA4 events, conversions, User ID, and CTA attribution so marketing decisions have trustworthy numbers.
Overview
Analytics Tracking is an agent skill for the Grow phase that guides GA4 setup, event and conversion tracking, User ID, and CTA attribution for trustworthy marketing measurement.
Install
npx skills add https://github.com/kostja94/marketing-skills --skill analytics-trackingWhat is this skill?
- Covers GA4 setup, gtag/data layer patterns, event tracking, and conversion marking
- Documents User ID for cross-device, cross-session identification after login
- CTA attribution table: per-article cta_click events with content_url and conversion flags for article ROI
- Explicit handoff to seo-monitoring for article databases and benchmarking
- Skill metadata version 1.3.1 for web and app tracking across marketing channels
Adoption & trust: 1.2k installs on skills.sh; 586 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You shipped pages or campaigns but conversions are wrong, events are missing, or you cannot tie article CTAs to revenue-ready signals in GA4.
Who is it for?
Indie SaaS and content sites that need GA4 event taxonomy and conversion hygiene without a dedicated data team.
Skip if: Pure traffic or SEO ranking analysis without changing tags—use the companion traffic-analysis skill instead.
When should I use this skill?
User wants to set up, audit, or optimize analytics tracking (GA4, events, conversions) or mentions Google Analytics, GA4, gtag, data layer, User ID tracking, or CTA attribution.
What do I get? / Deliverables
You leave with a concrete tracking plan—named events, conversion flags, User ID when identified, and CTA_click patterns—ready to validate in DebugView and iterate with seo-monitoring.
- Event naming and parameter plan
- Conversion and User ID implementation notes
- CTA attribution event spec for content URLs
Recommended Skills
Journey fit
Grow is where instrumentation pays off—after ship you need measurable funnels, content ROI, and cross-session attribution. Analytics subphase matches implementation and optimization of tracking stacks, not traffic interpretation (use traffic-analysis separately).
How it compares
Implementation-focused GA4 playbook—not a dashboard-only reporting skill.
Common Questions / FAQ
Who is analytics-tracking for?
Solo builders and small teams shipping web or app products who own their own GA4/gtag implementation and conversion definitions.
When should I use analytics-tracking?
In Grow when setting up GA4, auditing broken events, configuring conversions, enabling User ID after login, or measuring CTA clicks on key articles; also when users say Google Analytics, event tracking, or attribution model.
Is analytics-tracking safe to install?
The skill advises tracking changes that touch production tags; review the Security Audits panel on this page and validate edits in a staging property or DebugView before publishing.
SKILL.md
READMESKILL.md - Analytics Tracking
# Analytics: Tracking Guides analytics implementation: GA4 setup, event tracking, conversions, and data quality. Applies to web and app tracking across marketing channels. **When invoking**: On **first use**, if helpful, open with 1-2 sentences on what this skill covers and why it matters, then provide the main output. On **subsequent use** or when the user asks to skip, go directly to the main output. ## User ID - **Purpose**: Cross-device, cross-session user identification - **Implementation**: Set `user_id` when user is identified (e.g., login); send to GA4 - **Benefit**: Accurate attribution across sessions; better audience building ## CTA Attribution (Article ROI) Track CTA clicks on key articles to measure content ROI: | Action | Purpose | |--------|---------| | **Event per CTA** | e.g., `cta_click` with `content_url`, `content_type` | | **Conversion** | Mark as conversion in GA4 for attribution | | **Use** | Compare high vs low performers; optimize CTA placement and copy | See **seo-monitoring** for article database and benchmark context. ## Infrastructure Requirements | Component | Purpose | |-----------|---------| | **Data warehouse** | Centralized data; BI reporting | | **Event tracking** | User behavior; funnel mapping | | **Attribution** | Ad pixels; attribution model; impression-to-sale tracking | **Optimization flow**: Clean UTM + conversion events → attribution reports → optimize channel mix. ## Scope - **GA4**: Web data stream, gtag.js, configuration - **User ID**: Cross-device, cross-session identification - **CTA attribution**: Per-article conversion tracking for content ROI - **Events**: Recommended and custom events - **Conversions**: Key events, parameters - **Quality**: Naming, testing, validation ## GA4 Setup ### Prerequisites - Google Analytics property and web data stream - Google tag (gtag.js) on all pages - Measurement ID (e.g., `G-XXXXXXXXXX`) ### Enhanced Measurement Enable in Admin > Data Streams > Enhanced Measurement for automatic tracking of: - Page views, scrolls, outbound clicks - Site search, file downloads - Video engagement (YouTube) ## Event Tracking ### Event Types | Type | Description | |------|-------------| | **Automatically collected** | page_view, first_visit, session_start | | **Enhanced measurement** | scroll, click, file_download, etc. | | **Recommended** | purchase, sign_up, search, etc. | | **Custom** | Business-specific actions | ### Naming Conventions - **Length**: <=40 characters (GA4 hard limit; longer names are not logged) - **Format**: `snake_case`, lowercase - **Verb first**: `download_pdf`, `submit_form`, `video_play` - **Context**: `pricing_page_scroll` vs generic `scroll` ### gtag.js Syntax ```javascript gtag('event', '<event_name>', { <parameter_name>: <value>, // e.g. value: 99.99, currency: 'USD' }); ``` Place below the Google tag snippet. Events fire on page load or user action (e.g., button click). ### Recommended Events | Event | Use | Key Parameters | |-------|-----|----------------| | `purchase` | E-commerce | value, currency, items | | `sign_up` | Registration | method | | `login` | Login | method | | `search` | Site search | search_term | | `view_item` | Product view | items | | `add_to_cart` | Add to cart | items | ### Custom Events - Focus on 15-25 meaningful events aligned with KPIs - Add parameters for context (e.g., `content_type`, `item_id`) - Avoid tracking everything; prioritize quality over quantity ## Conversions (Key Events) - Mark important events as conversions in GA4 Admin