Refactor remaining skills for progressive disclosure
Phase 2 refactoring of skills >500 lines and medium-sized skills: - paid-ads: 553 → 297 lines - Extract ad-copy-templates.md, audience-targeting.md, platform-setup-checklists.md - analytics-tracking: 541 → 292 lines - Extract ga4-implementation.md, gtm-implementation.md, event-library.md - ab-test-setup: 510 → 264 lines - Extract test-templates.md, sample-size-guide.md - copywriting: 458 → 248 lines - Extract copy-frameworks.md (headline formulas, section types) - page-cro: 336 → 180 lines - Extract experiments.md (experiment ideas by page type) - onboarding-cro: 435 → 218 lines - Extract experiments.md (onboarding experiment ideas) All skills now use progressive disclosure with references/ folders, keeping SKILL.md files focused on core workflow while detailed content is available when needed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,20 +14,9 @@ If `.claude/product-marketing-context.md` exists, read it before asking question
|
||||
|
||||
Before implementing tracking, understand:
|
||||
|
||||
1. **Business Context**
|
||||
- What decisions will this data inform?
|
||||
- What are the key conversion actions?
|
||||
- What questions need answering?
|
||||
|
||||
2. **Current State**
|
||||
- What tracking exists?
|
||||
- What tools are in use (GA4, Mixpanel, Amplitude, etc.)?
|
||||
- What's working/not working?
|
||||
|
||||
3. **Technical Context**
|
||||
- What's the tech stack?
|
||||
- Who will implement and maintain?
|
||||
- Any privacy/compliance requirements?
|
||||
1. **Business Context** - What decisions will this data inform? What are key conversions?
|
||||
2. **Current State** - What tracking exists? What tools are in use?
|
||||
3. **Technical Context** - What's the tech stack? Any privacy/compliance requirements?
|
||||
|
||||
---
|
||||
|
||||
@@ -60,63 +49,36 @@ Before implementing tracking, understand:
|
||||
### Structure
|
||||
|
||||
```
|
||||
Event Name | Event Category | Properties | Trigger | Notes
|
||||
---------- | ------------- | ---------- | ------- | -----
|
||||
Event Name | Category | Properties | Trigger | Notes
|
||||
---------- | -------- | ---------- | ------- | -----
|
||||
```
|
||||
|
||||
### Event Types
|
||||
|
||||
**Pageviews**
|
||||
- Automatic in most tools
|
||||
- Enhanced with page metadata
|
||||
| Type | Examples |
|
||||
|------|----------|
|
||||
| Pageviews | Automatic, enhanced with metadata |
|
||||
| User Actions | Button clicks, form submissions, feature usage |
|
||||
| System Events | Signup completed, purchase, subscription changed |
|
||||
| Custom Conversions | Goal completions, funnel stages |
|
||||
|
||||
**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
|
||||
**For comprehensive event lists**: See [references/event-library.md](references/event-library.md)
|
||||
|
||||
---
|
||||
|
||||
## Event Naming Conventions
|
||||
|
||||
### Format Options
|
||||
### Recommended Format: Object-Action
|
||||
|
||||
**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_clicked` vs. `button_clicked`
|
||||
- Include context in properties, not event name
|
||||
@@ -125,235 +87,94 @@ onboarding_step_completed
|
||||
|
||||
---
|
||||
|
||||
## Essential Events to Track
|
||||
## Essential Events
|
||||
|
||||
### 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
|
||||
| Event | Properties |
|
||||
|-------|------------|
|
||||
| cta_clicked | button_text, location |
|
||||
| form_submitted | form_type |
|
||||
| signup_completed | method, source |
|
||||
| demo_requested | - |
|
||||
|
||||
### Product/App
|
||||
|
||||
**Onboarding**
|
||||
- signup_completed
|
||||
- onboarding_step_completed (step_number, step_name)
|
||||
- onboarding_completed
|
||||
- first_key_action_completed
|
||||
| Event | Properties |
|
||||
|-------|------------|
|
||||
| onboarding_step_completed | step_number, step_name |
|
||||
| feature_used | feature_name |
|
||||
| purchase_completed | plan, value |
|
||||
| subscription_cancelled | reason |
|
||||
|
||||
**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)
|
||||
**For full event library by business type**: See [references/event-library.md](references/event-library.md)
|
||||
|
||||
---
|
||||
|
||||
## Event Properties (Parameters)
|
||||
## Event Properties
|
||||
|
||||
### Standard Properties to Consider
|
||||
### Standard Properties
|
||||
|
||||
**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
|
||||
| Category | Properties |
|
||||
|----------|------------|
|
||||
| Page | page_title, page_location, page_referrer |
|
||||
| User | user_id, user_type, account_id, plan_type |
|
||||
| Campaign | source, medium, campaign, content, term |
|
||||
| Product | product_id, product_name, category, price |
|
||||
|
||||
### Best Practices
|
||||
|
||||
- Use consistent property names
|
||||
- Include relevant context
|
||||
- Don't duplicate GA4 automatic properties
|
||||
- Don't duplicate automatic properties
|
||||
- Avoid PII in properties
|
||||
- Document expected values
|
||||
|
||||
---
|
||||
|
||||
## GA4 Implementation
|
||||
|
||||
### Configuration
|
||||
### Quick Setup
|
||||
|
||||
**Data Streams**
|
||||
- One stream per platform (web, iOS, Android)
|
||||
- Enable enhanced measurement
|
||||
1. Create GA4 property and data stream
|
||||
2. Install gtag.js or GTM
|
||||
3. Enable enhanced measurement
|
||||
4. Configure custom events
|
||||
5. Mark conversions in Admin
|
||||
|
||||
**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)
|
||||
### Custom Event Example
|
||||
|
||||
```javascript
|
||||
// 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
|
||||
|
||||
1. Collect event in GA4
|
||||
2. Mark as conversion in Admin > Events
|
||||
3. Set conversion counting (once per session or every time)
|
||||
4. 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:**
|
||||
1. Create in Admin > Custom definitions
|
||||
2. Scope: Event, User, or Item
|
||||
3. Parameter name must match
|
||||
**For detailed GA4 implementation**: See [references/ga4-implementation.md](references/ga4-implementation.md)
|
||||
|
||||
---
|
||||
|
||||
## Google Tag Manager Implementation
|
||||
## Google Tag Manager
|
||||
|
||||
### 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
|
||||
| Component | Purpose |
|
||||
|-----------|---------|
|
||||
| Tags | Code that executes (GA4, pixels) |
|
||||
| Triggers | When tags fire (page view, click) |
|
||||
| Variables | Dynamic values (click text, data layer) |
|
||||
|
||||
### Data Layer Pattern
|
||||
|
||||
```javascript
|
||||
// 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
|
||||
}]
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
**For detailed GTM implementation**: See [references/gtm-implementation.md](references/gtm-implementation.md)
|
||||
|
||||
---
|
||||
|
||||
## UTM Parameter Strategy
|
||||
@@ -362,40 +183,17 @@ dataLayer.push({
|
||||
|
||||
| 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_source | Traffic source | google, newsletter |
|
||||
| utm_medium | Marketing medium | cpc, email, social |
|
||||
| utm_campaign | Campaign name | spring_sale |
|
||||
| utm_content | Differentiate versions | hero_cta |
|
||||
| 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
|
||||
- Lowercase everything
|
||||
- Use underscores or hyphens consistently
|
||||
- Be specific but concise: `blog_footer_cta`, not `cta1`
|
||||
- Document all UTMs in a spreadsheet
|
||||
|
||||
---
|
||||
|
||||
@@ -403,72 +201,44 @@ Provide a consistent UTM builder link to team:
|
||||
|
||||
### 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
|
||||
| Tool | Use For |
|
||||
|------|---------|
|
||||
| GA4 DebugView | Real-time event monitoring |
|
||||
| GTM Preview Mode | Test triggers before publish |
|
||||
| Browser Extensions | Tag Assistant, dataLayer Inspector |
|
||||
|
||||
### Validation Checklist
|
||||
|
||||
- [ ] Events firing on correct triggers
|
||||
- [ ] Property values populating correctly
|
||||
- [ ] No duplicate events
|
||||
- [ ] Works across browsers
|
||||
- [ ] Works on mobile
|
||||
- [ ] Works across browsers and 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
|
||||
| Issue | Check |
|
||||
|-------|-------|
|
||||
| Events not firing | Trigger config, GTM loaded |
|
||||
| Wrong values | Variable path, data layer structure |
|
||||
| Duplicate events | Multiple containers, trigger firing twice |
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
- Use consent mode (wait for consent)
|
||||
- IP anonymization
|
||||
- No PII in custom dimensions
|
||||
- Only collect what you need
|
||||
- Integrate with consent management platform
|
||||
|
||||
---
|
||||
|
||||
@@ -476,51 +246,32 @@ Provide a consistent UTM builder link to team:
|
||||
|
||||
### Tracking Plan Document
|
||||
|
||||
```
|
||||
```markdown
|
||||
# [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]
|
||||
| signup_completed | User completes signup | method, plan | Success page |
|
||||
|
||||
## Custom Dimensions
|
||||
|
||||
| Name | Scope | Parameter | Description |
|
||||
|------|-------|-----------|-------------|
|
||||
| user_type | User | user_type | Free, trial, paid |
|
||||
| Name | Scope | Parameter |
|
||||
|------|-------|-----------|
|
||||
| user_type | User | user_type |
|
||||
|
||||
## Conversions
|
||||
|
||||
| Conversion | Event | Counting | Google Ads |
|
||||
|------------|-------|----------|------------|
|
||||
| Signup | signup_completed | Once per session | Yes |
|
||||
|
||||
## UTM Convention
|
||||
|
||||
[Guidelines]
|
||||
| Conversion | Event | Counting |
|
||||
|------------|-------|----------|
|
||||
| Signup | signup_completed | Once per session |
|
||||
```
|
||||
|
||||
### Implementation Code
|
||||
|
||||
Provide ready-to-use code snippets
|
||||
|
||||
### Testing Checklist
|
||||
|
||||
Specific validation steps
|
||||
|
||||
---
|
||||
|
||||
## Task-Specific Questions
|
||||
|
||||
Reference in New Issue
Block a user