Skip to main content
ClaudeWave
Skill608 estrellas del repoactualizado 4d ago

analytics-tracking

The analytics-tracking skill guides implementation of Google Analytics 4 tracking infrastructure, including event setup, user ID configuration, and conversion attribution measurement. Use this skill when setting up GA4, tracking custom events, implementing cross-device user identification, measuring article or call-to-action performance, or optimizing conversion tracking and attribution models across marketing channels.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/kostja94/marketing-skills /tmp/analytics-tracking && cp -r /tmp/analytics-tracking/skills/analytics/tracking ~/.claude/skills/analytics-tracking
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# 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
- 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.

| Model | Use |
|-------|-----|
| **Data-driven** (GA4 default) | ML assigns credit by actual contribution; best for multi-touch journeys |
| **Last-click** | 100% 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](https://web.utm.io/blog/utms-for-marketing-attribution/), [GA4 – Get started with attribution](https://support.google.com/analytics/answer/10596866)

## Testing & Validation

| Tool | Use |
|------|-----|
| **Realtime** | See events as they fire |
| **DebugView** | Detailed event/parameter inspection; requires debug mode |
| **GA4 Debug mode** | `gtag('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
google-search-consoleSkill

When the user wants to analyze Google Search Console data, use the GSC API, or interpret search performance. Also use when the user mentions "GSC," "Search Console," "indexing report," "Core Web Vitals," "Enhancements," "Insights report," "search performance," "search queries," "search performance report," "URL inspection," "impressions," "CTR," "average position," "index coverage," "GSC data analysis," "Search Console API," or "searchanalytics.query." When the user wants to rewrite title tags (not only report on them), use title-tag. For meta description rewrites, use meta-description.

seo-monitoringSkill

When the user wants to build an SEO data analysis system, monitor indexing/traffic/keywords/backlinks, or set up benchmarks. Also use when the user mentions "SEO data analysis," "SEO monitoring," "article database," "traffic benchmark," "penalty recovery," "SEO work document," "SEO dashboard," "keyword tracking," "ranking monitoring," "indexing report," or "backlink monitoring." For GSC API, use google-search-console.

ai-traffic-trackingSkill

When the user wants to track AI search traffic in GA4 or GSC. Also use when the user mentions "AI traffic," "ChatGPT referral," "Perplexity traffic," "AI Overviews," "GA4 AI sources," "AI search analytics," "track AI referrals," "AI search traffic," "Claude traffic," or "how to track AI traffic." For AI SEO strategy, use generative-engine-optimization.

traffic-analysisSkill

When the user wants to analyze website traffic sources, attribution, or dark traffic. Also use when the user mentions "traffic sources," "dark traffic," "direct traffic," "UTM parameters," "traffic attribution," "channel attribution," "attribution optimization," "channel analysis," "traffic analysis," "traffic diversification," "natural traffic benchmark," or "organic vs paid traffic." For GA4 setup, use analytics-tracking.

community-forumSkill

When the user wants to promote via forums, communities, or invite users to join a community. Also use when the user mentions "forum promotion," "Indie Hacker," "Hacker News," "community growth," "Discord promotion," "vertical community," "brand encyclopedia," "Wikipedia," "Quora," "Reddit community," "community building," "forum marketing," or "community invite." For Reddit copy, use reddit-posts. For strategy, use integrated-marketing.

directory-submissionSkill

When the user wants to submit a product or app to directories, curated lists, launch platforms, or app stores—and needs ready-to-paste copy per platform. Reads project-context.md when present. Also use when the user mentions "directory submission," "get listed," "app store listing," "submit to directories," "curated list," "best tools list," "Taaft," "Product Hunt," "directory ads," "newsletter feature," "directory campaign," "tailor description per platform," "Shopify App Store," "Chrome Web Store," "navigation site," or "product directory." For Product Hunt launch day tactics (hunter, first comment, timing), use product-hunt-launch. For full 0→1 channel planning, use cold-start-strategy.

product-hunt-launchSkill

When the user wants to launch on Product Hunt, prepare a PH submission, or plan launch day (hunter, first comment, timing, upvotes). Also use when the user mentions "Product Hunt," "launch on Product Hunt," "PH launch," "Product Hunt submission," "hunter," "Product of the Day," "upvotes," or "Product Hunt first comment." For multi-platform directory listings and paste-ready copy beyond PH, use directory-submission.

distribution-channelsSkill

When the user wants to plan product distribution via marketplaces, app stores, or third-party platforms. Also use when the user mentions "distribution channels," "marketplace listing," "app store listing," "Figma plugin," "Chrome extension marketplace," "AWS Marketplace," "Shopify app," "GPTs store," "app distribution," or "third-party marketplace." For channel mix, use integrated-marketing.