PluginBench
Skill
Pass
Audit score 90

analytics-tracking

kostja94/marketing-skills

Set up, audit, and optimize GA4 tracking: events, conversions, User ID, and attribution.

What is analytics-tracking?

This skill guides GA4 implementation, event tracking setup, conversion configuration, and data quality validation. Use it when setting up analytics, auditing tracking accuracy, optimizing attribution models, or troubleshooting event capture across web properties.

  • Configure GA4 web data streams, gtag.js, and enhanced measurement
  • Design and implement custom events with proper naming conventions and parameters
  • Set up User ID tracking for cross-device and cross-session identification
  • Mark key events as conversions and map them to business KPIs
  • Audit event quality using Realtime, DebugView, and GA4 Debug mode
  • Optimize attribution models and analyze multi-touch conversion paths

How to install analytics-tracking

npx skills add https://github.com/kostja94/marketing-skills --skill analytics-tracking
Prerequisites
  • Google Analytics property with web data stream created
  • Google tag (gtag.js) installed on all pages
  • Measurement ID (e.g., G-XXXXXXXXXX) from GA4 property
Claude Code
Cursor
Windsurf
Cline

How to use analytics-tracking

  1. 1.Enable Enhanced Measurement in GA4 Admin > Data Streams for automatic tracking
  2. 2.Define 15-25 key events aligned with business KPIs using snake_case naming
  3. 3.Implement custom events via gtag.js with relevant parameters (e.g., value, currency, content_type)
  4. 4.Set User ID in gtag when users log in or are identified
  5. 5.Mark important events as conversions in GA4 Admin for attribution and reporting
  6. 6.Test all events using Realtime, DebugView, or GA4 Debug mode before launch
  7. 7.Review attribution reports and optimize channel mix based on data-driven attribution credit

Use cases

Good for
  • Setting up GA4 tracking on a new website or web app
  • Implementing CTA tracking on articles to measure content ROI
  • Configuring purchase and sign-up events for e-commerce or SaaS products
  • Auditing existing GA4 setup to find missing or duplicate events
  • Optimizing UTM parameters and attribution models to improve channel ROI allocation
Who it's for
  • Marketing managers optimizing campaign attribution and ROI
  • Product managers tracking user behavior and conversion funnels
  • Web developers implementing analytics code and custom events
  • Analytics specialists auditing data quality and GA4 configuration
  • Growth teams analyzing multi-touch attribution across channels

analytics-tracking FAQ

What's the difference between events and conversions in GA4?

Events are user actions you track (e.g., button clicks, purchases). Conversions are key events you mark in GA4 Admin as important for business goals. All conversions are events, but not all events are conversions.

How do I track users across devices and sessions?

Set the `user_id` parameter in gtag when a user logs in or is identified. Send it to GA4 via `gtag('config', 'G-XXX', { 'user_id': 'USER_ID' });`. This enables cross-device attribution and better audience building.

What naming convention should I use for custom events?

Use snake_case, lowercase, ≤40 characters. Start with a verb (e.g., `download_pdf`, `submit_form`). Add context for clarity (e.g., `pricing_page_scroll` instead of generic `scroll`).

How do I validate that events are firing correctly?

Use GA4 Realtime to see events as they fire, DebugView for detailed inspection, or enable GA4 Debug mode with `gtag('config', 'G-XXX', { 'debug_mode': true });`. Test before launch to verify parameters and naming.

Which attribution model should I use?

GA4's data-driven model (default) uses machine learning to assign credit by actual contribution across touchpoints. Use it for multi-touch journeys. Last-click is simpler but undervalues awareness and consideration phases.

Full instructions (SKILL.md)

Source of truth, from kostja94/marketing-skills.


name: analytics-tracking description: When the user wants to set up, audit, or optimize analytics tracking (GA4, events, conversions). Also use when the user mentions "Google Analytics," "GA4," "event tracking," "conversions," "attribution model," "gtag," "data layer," "GA4 setup," "conversion tracking," "event setup," "User ID tracking," or "CTA attribution." For traffic insights, use traffic-analysis. metadata: version: 1.3.1

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:

ActionPurpose
Event per CTAe.g., cta_click with content_url, content_type
ConversionMark as conversion in GA4 for attribution
UseCompare high vs low performers; optimize CTA placement and copy

See seo-monitoring for article database and benchmark context.

Infrastructure Requirements

ComponentPurpose
Data warehouseCentralized data; BI reporting
Event trackingUser behavior; funnel mapping
AttributionAd 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

TypeDescription
Automatically collectedpage_view, first_visit, session_start
Enhanced measurementscroll, click, file_download, etc.
Recommendedpurchase, sign_up, search, etc.
CustomBusiness-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

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

EventUseKey Parameters
purchaseE-commercevalue, currency, items
sign_upRegistrationmethod
loginLoginmethod
searchSite searchsearch_term
view_itemProduct viewitems
add_to_cartAdd to cartitems

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
  • Use for attribution, audiences, and reporting
  • Typical: purchase, sign_up, lead, contact

Attribution & Conversion Optimization

Attribution models determine how conversion credit is assigned across touchpoints. Use attribution data to optimize ads and growth channels.

ModelUse
Data-driven (GA4 default)ML assigns credit by actual contribution; best for multi-touch journeys
Last-click100% to final touchpoint; simple but undervalues awareness/consideration

Optimization flow: Clean UTM (source, medium, campaign) + conversion events → GA4 attribution reports → compare channels by attributed conversions → reallocate budget to ads/channels that drive results. Inconsistent UTM fragments data; multi-touch attribution requires reliable touchpoint data.

Reference: UTM.io – UTMs for Marketing Attribution, GA4 – Get started with attribution

Testing & Validation

ToolUse
RealtimeSee events as they fire
DebugViewDetailed event/parameter inspection; requires debug mode
GA4 Debug modegtag('config', 'G-XXX', { 'debug_mode': true }); or GTM preview
  • Test before launch; verify parameters and naming
  • Check for duplicate events, missing values

Output Format

  • Event list (name, trigger, parameters)
  • Implementation notes (gtag or GTM)
  • Conversion mapping
  • Testing checklist

Related Skills

  • traffic-analysis: UTM, source attribution; attribution for channel optimization
  • ai-traffic-tracking: AI traffic in GA4
  • google-search-console: GSC analysis (correlate with GA4)
  • seo-monitoring: Article database, benchmark, full SEO monitoring framework

Related skills

More from kostja94/marketing-skills and the wider catalog.

APapp-ads logo

app-ads

kostja94/marketing-skills

When the user wants to run app install ads, user acquisition (UA), or promote mobile apps. Also use when the user mentions "app ads," "app install ads," "UA," "user acquisition," "Google App Campaigns," "Apple Search Ads," "ASA," "UAC," "App Store ads," "Play Store ads," "CPI," or "app promotion." For store listings, use distribution-channels.

755 installsAudited
ARarticle-content logo

article-content

kostja94/marketing-skills

Generate article body content—introductions, sections, conclusions for blog posts, guides, and long-form pieces.

1.4k installs
ARarticle-page-generator logo

article-page-generator

kostja94/marketing-skills

When the user wants to create, optimize, or audit a single article/post page (not the blog index). Also use when the user mentions "article page," "blog post page," "single post," "post template," "article structure," "post optimization," "competitor article analysis," "optimize based on top-ranking articles," "analyze ranking articles," "optimize article for SEO," or "article schema." For writing article body copy, use article-content. For blog listing/index page, use blog-page-generator.

786 installs
BAbacklink-analysis logo

backlink-analysis

kostja94/marketing-skills

When the user wants to analyze backlinks, audit link profile, or identify link issues. Also use when the user mentions "backlink analysis," "backlink audit," "referring domains," "toxic links," "link profile," or "disavow file." For acquisition, use link-building.

809 installs
BLblog-page-generator logo

blog-page-generator

kostja94/marketing-skills

When the user wants to create, optimize, or audit blog index or listing page structure (not a single post). Also use when the user mentions "blog page," "blog index," "blog layout," "content hub," "blog homepage," "blog listing," "subdomain vs subdirectory," "blog structure," or "blog SEO." For single post page SEO and schema, use article-page-generator.

859 installsAudited
BRbrand-monitoring logo

brand-monitoring

kostja94/marketing-skills

When the user wants to monitor brand mentions, detect trademark infringement, or set up brand monitoring. Also use when the user mentions "brand monitoring," "brand watch," "trademark watch," "brand mentions," "impersonation detection," "counterfeit detection," or "brand abuse monitoring." For enforcement, use brand-protection.

702 installsAudited