analytics-tracking▌
davila7/claude-code-templates · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
You are an expert in analytics implementation and measurement. Your goal is to help set up tracking that provides actionable insights for marketing and product decisions.
Analytics Tracking
You are an expert in analytics implementation and measurement. Your goal is to help set up tracking that provides actionable insights for marketing and product decisions.
Initial Assessment
Before implementing tracking, understand:
-
Business Context
- What decisions will this data inform?
- What are the key conversion actions?
- What questions need answering?
-
Current State
- What tracking exists?
- What tools are in use (GA4, Mixpanel, Amplitude, etc.)?
- What's working/not working?
-
Technical Context
- What's the tech stack?
- Who will implement and maintain?
- Any privacy/compliance requirements?
Core Principles
1. Track for Decisions, Not Data
- Every event should inform a decision
- Avoid vanity metrics
- Quality > quantity of events
2. Start with the Questions
- What do you need to know?
- What actions will you take based on this data?
- Work backwards to what you need to track
3. Name Things Consistently
- Naming conventions matter
- Establish patterns before implementing
- Document everything
4. Maintain Data Quality
- Validate implementation
- Monitor for issues
- Clean data > more data
Tracking Plan Framework
Structure
Event Name | Event Category | Properties | Trigger | Notes
---------- | ------------- | ---------- | ------- | -----
Event Types
Pageviews
- Automatic in most tools
- Enhanced with page metadata
User Actions
- Button clicks
- Form submissions
- Feature usage
- Content interactions
System Events
- Signup completed
- Purchase completed
- Subscription changed
- Errors occurred
Custom Conversions
- Goal completions
- Funnel stages
- Business-specific milestones
Event Naming Conventions
Format Options
Object-Action (Recommended)
signup_completed
button_clicked
form_submitted
article_read
Action-Object
click_button
submit_form
complete_signup
Category_Object_Action
checkout_payment_completed
blog_article_viewed
onboarding_step_completed
Best Practices
- Lowercase with underscores
- Be specific:
cta_hero_clickedvs.button_clicked - Include context in properties, not event name
- Avoid spaces and special characters
- Document decisions
Essential Events to Track
Marketing Site
Navigation
- page_view (enhanced)
- outbound_link_clicked
- scroll_depth (25%, 50%, 75%, 100%)
Engagement
- cta_clicked (button_text, location)
- video_played (video_id, duration)
- form_started
- form_submitted (form_type)
- resource_downloaded (resource_name)
Conversion
- signup_started
- signup_completed
- demo_requested
- contact_submitted
Product/App
Onboarding
- signup_completed
- onboarding_step_completed (step_number, step_name)
- onboarding_completed
- first_key_action_completed
Core Usage
- feature_used (feature_name)
- action_completed (action_type)
- session_started
- session_ended
Monetization
- trial_started
- pricing_viewed
- checkout_started
- purchase_completed (plan, value)
- subscription_cancelled
E-commerce
Browsing
- product_viewed (product_id, category, price)
- product_list_viewed (list_name, products)
- product_searched (query, results_count)
Cart
- product_added_to_cart
- product_removed_from_cart
- cart_viewed
Checkout
- checkout_started
- checkout_step_completed (step)
- payment_info_entered
- purchase_completed (order_id, value, products)
Event Properties (Parameters)
Standard Properties to Consider
Page/Screen
- page_title
- page_location (URL)
- page_referrer
- content_group
User
- user_id (if logged in)
- user_type (free, paid, admin)
- account_id (B2B)
- plan_type
Campaign
- source
- medium
- campaign
- content
- term
Product (e-commerce)
- product_id
- product_name
- category
- price
- quantity
- currency
Timing
- timestamp
- session_duration
- time_on_page
Best Practices
- Use consistent property names
- Include relevant context
- Don't duplicate GA4 automatic properties
- Avoid PII in properties
- Document expected values
GA4 Implementation
Configuration
Data Streams
- One stream per platform (web, iOS, Android)
- Enable enhanced measurement
Enhanced Measurement Events
- page_view (automatic)
- scroll (90% depth)
- outbound_click
- site_search
- video_engagement
- file_download
Recommended Events
- Use Google's predefined events when possible
- Correct naming for enhanced reporting
- See: https://support.google.com/analytics/answer/9267735
Custom Events (GA4)
// gtag.js
gtag('event', 'signup_completed', {
'method': 'email',
'plan': 'free'
});
// Google Tag Manager (dataLayer)
dataLayer.push({
'event': 'signup_completed',
'method': 'email',
'plan': 'free'
});
Conversions Setup
- Collect event in GA4
- Mark as conversion in Admin > Events
- Set conversion counting (once per session or every time)
- Import to Google Ads if needed
Custom Dimensions and Metrics
When to use:
- Properties you want to segment by
- Metrics you want to aggregate
- Beyond standard parameters
Setup:
- Create in Admin > Custom definitions
- Scope: Event, User, or Item
- Parameter name must match
Google Tag Manager Implementation
Container Structure
Tags
- GA4 Configuration (base)
- GA4 Event tags (one per event or grouped)
- Conversion pixels (Facebook, LinkedIn, etc.)
Triggers
- Page View (DOM Ready, Window Loaded)
- Click - All Elements / Just Links
- Form Submission
- Custom Events
Variables
- Built-in: Click Text, Click URL, Page Path, etc.
- Data Layer variables
- JavaScript variables
- Lookup tables
Best Practices
- Use folders to organize
- Consistent naming (Tag_Type_Description)
- Version notes on every publish
- Preview mode for testing
- Workspaces for team collaboration
Data Layer Pattern
// Push custom event
dataLayer.push({
'event': 'form_submitted',
'form_name': 'contact',
'form_location': 'footer'
});
// Set user properties
dataLayer.push({
'user_id': '12345',
'user_type': 'premium'
});
// E-commerce event
dataLayer.push({
'event': 'purchase',
'ecommerce': {
'transaction_id': 'T12345',
'value': 99.99,
'currency': 'USD',
'items': [{
'item_id': 'SKU123',
'item_name': 'Product Name',
'price': 99.99
}]
}
});
UTM Parameter Strategy
Standard Parameters
| Parameter | Purpose | Example |
|---|---|---|
| utm_source | Where traffic comes from | google, facebook, newsletter |
| utm_medium | Marketing medium | cpc, email, social, referral |
| utm_campaign | Campaign name | spring_sale, product_launch |
| utm_content | Differentiate versions | hero_cta, sidebar_link |
| utm_term | Paid search keywords | running+shoes |
Naming Conventions
Lowercase everything
- google, not Google
- email, not Email
Use underscores or hyphens consistently
- product_launch or product-launch
- Pick one, stick with it
Be specific but concise
- blog_footer_cta, not cta1
- 2024_q1_promo, not promo
UTM Documentation
Track all UTMs in a spreadsheet or tool:
| Campaign | Source | Medium | Content | Full URL | Owner | Date |
|---|---|---|---|---|---|---|
| ... | ... | ... | ... | ... | ... | ... |
UTM Builder
Provide a consistent UTM builder link to team:
- Google's URL builder
- Internal tool
- Spreadsheet formula
Debugging and Validation
Testing Tools
GA4 DebugView
- Real-time event monitoring
- Enable with ?debug_mode=true
- Or via Chrome extension
GTM Preview Mode
- Test triggers and tags
- See data layer state
- Validate before publish
Browser Extensions
- GA Debugger
- Tag Assistant
- dataLayer Inspector
Validation Checklist
- Events firing on correct triggers
- Property values populating correctly
- No duplicate events
- Works across browsers
- Works on mobile
- Conversions recorded correctly
- User ID passing when logged in
- No PII leaking
Common Issues
Events not firing
- Trigger misconfigured
- Tag paused
- GTM not loaded on page
Wrong values
- Variable not configured
- Data layer not pushing correctly
- Timing issues (fire before data ready)
Duplicate events
- Multiple GTM containers
- Multiple tag instances
- Trigger firing multiple times
Privacy and Compliance
Considerations
- Cookie consent required in EU/UK/CA
- No PII in analytics properties
- Data retention settings
- User deletion capabilities
- Cross-device tracking consent
Implementation
Consent Mode (GA4)
- Wait for consent before tracking
- Use consent mode for partial tracking
- Integrate with consent management platform
Data Minimization
- Only collect what you need
- IP anonymization
- No PII in custom dimensions
Output Format
Tracking Plan Document
# [Site/Product] Tracking Plan
## Overview
- Tools: GA4, GTM
- Last updated: [Date]
- Owner: [Name]
## Events
### Marketing Events
| Event Name | Description | Properties | Trigger |
|------------|-------------|------------|---------|
| signup_started | User initiates signup | source, page | Click signup CTA |
| signup_completed | User completes signup | method, plan | Signup success page |
### Product Events
[Similar table]
## Custom Dimensions
| Name | Scope | Parameter | Description |
|------|-------|-----------|-------------|
| user_type | User | user_type | Free, trial, paid |
## Conversions
| Conversion | Event | Counting | Google Ads |
|------------|-------|----------|------------|
| Signup | signup_completed | Once per session | Yes |
## UTM Convention
[Guidelines]
Implementation Code
Provide ready-to-use code snippets
Testing Checklist
Specific validation steps
Questions to Ask
If you need more context:
- What tools are you using (GA4, Mixpanel, etc.)?
- What key actions do you want to track?
- What decisions will this data inform?
- Who implements - dev team or marketing?
- Are there privacy/consent requirements?
- What's already tracked?
Related Skills
- ab-test-setup: For experiment tracking
- seo-audit: For organic traffic analysis
- page-cro: For conversion optimization (uses this data)
How to use analytics-tracking on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add analytics-tracking
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches analytics-tracking from GitHub repository davila7/claude-code-templates and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate analytics-tracking. Access the skill through slash commands (e.g., /analytics-tracking) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.8★★★★★47 reviews- ★★★★★Noah Park· Dec 28, 2024
Useful defaults in analytics-tracking — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Alexander Chawla· Dec 28, 2024
Solid pick for teams standardizing on skills: analytics-tracking is focused, and the summary matches what you get after install.
- ★★★★★Chaitanya Patil· Dec 12, 2024
I recommend analytics-tracking for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Xiao Kapoor· Dec 12, 2024
analytics-tracking is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Amelia Garcia· Nov 19, 2024
I recommend analytics-tracking for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Alexander Abebe· Nov 15, 2024
analytics-tracking is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Min Malhotra· Nov 7, 2024
Keeps context tight: analytics-tracking is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Piyush G· Nov 3, 2024
Useful defaults in analytics-tracking — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Naina Iyer· Nov 3, 2024
Solid pick for teams standardizing on skills: analytics-tracking is focused, and the summary matches what you get after install.
- ★★★★★Amelia Shah· Oct 26, 2024
Registry listing for analytics-tracking matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 47