30f9b9a729
* feat: v2.0 skill renames and CRO consolidation BREAKING CHANGE: Users must reinstall skills after this update. ## Skill Renames (16) - ab-test-setup → ab-testing - analytics-tracking → analytics - aso-audit → aso - competitor-alternatives → competitors - email-sequence → emails - free-tool-strategy → free-tools - launch-strategy → launch - onboarding-cro → onboarding - paywall-upgrade-cro → paywalls - popup-cro → popups - pricing-strategy → pricing - product-marketing-context → product-marketing - referral-program → referrals - schema-markup → schema - signup-flow-cro → signup - social-content → social ## Consolidations (1) - page-cro + form-cro → cro (form content in references/form.md) ## Why 2.0? - Shorter, cleaner skill names - Consistent naming (no -strategy, -setup, -cro suffixes) - All cross-references updated across 100+ files Total skills: 40 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(v2.0): update evals for renamed skills, fix validate script, clear warnings - Update 32 evals.json files to reference new skill names (page-cro → cro, product-marketing-context → product-marketing, etc.) — these were missed in the initial v2.0 rename pass since only SKILL.md and marketplace.json were updated. - Fix validate-skills.sh: replace GNU-only `head -n -1` with portable awk so frontmatter extraction works on macOS. - Move Copy Editing Checklist (56 lines) to references/checklist.md to bring copy-editing SKILL.md under the 500-line limit (508 → 457). - Add "see X" pointers to marketing-psychology description for skill discovery (cro, pricing, copywriting). - Update skill-request.yml issue template placeholder (page-cro → cro). All 40 skills now pass validation with zero warnings. * fix(v2.0): add evals for 8 missing skills, strip stale frontmatter from cro/form.md Adds 48 new eval cases (6 per skill) for skills that previously had no evals: aso, co-marketing, community-marketing, competitor-profiling, directory-submissions, image, lead-magnets, video. All 40 skills now have eval coverage (251 total cases). Strips leftover frontmatter from skills/cro/references/form.md — it was inherited from the old form-cro SKILL.md before consolidation. Reference files don't need frontmatter. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(v2.0): rename paid-ads → ads One more v2.0 simplification — drops the redundant 'paid-' qualifier. Updates the skill directory, SKILL.md frontmatter, evals.json, README skill table, the v2.0 rename table in VERSIONS.md (now 17 renames), and all cross-references in related skills (ad-creative, aso, competitor-profiling, customer-research, lead-magnets, marketing-ideas) plus the tools/integrations guides. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(v2.0): bump SKILL.md frontmatter version to 2.0.0 for all 40 skills VERSIONS.md was already updated to 2.0.0 but the metadata.version field inside each SKILL.md was still on 1.x. That mismatch would have caused the update-check flow to perpetually report 'update available' since it compares VERSIONS.md against local SKILL.md metadata versions. Caught by codex review (P1). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(v2.0): add legacy product-marketing-context.md filename fallback Before this fix, users upgrading from v1.x who had a `product-marketing-context.md` file would lose automatic context loading — every skill only checked the new `product-marketing.md` filename. Now all 40 skills also accept the legacy filename (in either `.agents/` or `.claude/`), and the README migration command covers both legacy and current filenames. Caught by codex review (P1 + P2). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(v2.0): re-sort README skills table alphabetically, fix ads box width The skills table had a few entries out of alphabetical order from the renames (co-marketing was after cold-email, ads was at the renamed position). Re-sorted alphabetically per sync-skills.js. Also padded the 'ads' cell in the ASCII flow diagram to keep the box width consistent. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(v2.0): document folder cleanup on upgrade, stop sync-skills from re-adding skills array README upgrade guide now includes: - A clear cleanup step for stale v1.x skill folders (renamed + consolidated) so users don't end up with both old and new folders side-by-side after upgrading - The full v1 to v2 rename map for reference - Existing product-marketing-context.md migration steps (preserved) sync-skills.js no longer (re-)introduces a `skills` array on marketplace.json -- Claude Code's plugin schema discovers skills via the `skills/` directory, and the explicit array was failing validation. The script now refreshes the description count and strips the stale array if present. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
301 lines
6.2 KiB
Markdown
301 lines
6.2 KiB
Markdown
# GA4 Implementation Reference
|
|
|
|
Detailed implementation guide for Google Analytics 4.
|
|
|
|
## Contents
|
|
- Configuration (data streams, enhanced measurement events, recommended events)
|
|
- Custom Events (gtag.js implementation, Google Tag Manager)
|
|
- Conversions Setup (creating conversions, conversion values)
|
|
- Custom Dimensions and Metrics (when to use, setup steps, examples)
|
|
- Audiences (creating audiences, audience examples)
|
|
- Debugging (DebugView, real-time reports, common issues)
|
|
- Data Quality (filters, cross-domain tracking, session settings)
|
|
- Integration with Google Ads (linking, audience export)
|
|
|
|
## Configuration
|
|
|
|
### Data Streams
|
|
|
|
- One stream per platform (web, iOS, Android)
|
|
- Enable enhanced measurement for automatic tracking
|
|
- Configure data retention (2 months default, 14 months max)
|
|
- Enable Google Signals (for cross-device, if consented)
|
|
|
|
### Enhanced Measurement Events (Automatic)
|
|
|
|
| Event | Description | Configuration |
|
|
|-------|-------------|---------------|
|
|
| page_view | Page loads | Automatic |
|
|
| scroll | 90% scroll depth | Toggle on/off |
|
|
| outbound_click | Click to external domain | Automatic |
|
|
| site_search | Search query used | Configure parameter |
|
|
| video_engagement | YouTube video plays | Toggle on/off |
|
|
| file_download | PDF, docs, etc. | Configurable extensions |
|
|
|
|
### Recommended Events
|
|
|
|
Use Google's predefined events when possible for enhanced reporting:
|
|
|
|
**All properties:**
|
|
- login, sign_up
|
|
- share
|
|
- search
|
|
|
|
**E-commerce:**
|
|
- view_item, view_item_list
|
|
- add_to_cart, remove_from_cart
|
|
- begin_checkout
|
|
- add_payment_info
|
|
- purchase, refund
|
|
|
|
**Games:**
|
|
- level_up, unlock_achievement
|
|
- post_score, spend_virtual_currency
|
|
|
|
Reference: https://support.google.com/analytics/answer/9267735
|
|
|
|
---
|
|
|
|
## Custom Events
|
|
|
|
### gtag.js Implementation
|
|
|
|
```javascript
|
|
// Basic event
|
|
gtag('event', 'signup_completed', {
|
|
'method': 'email',
|
|
'plan': 'free'
|
|
});
|
|
|
|
// Event with value
|
|
gtag('event', 'purchase', {
|
|
'transaction_id': 'T12345',
|
|
'value': 99.99,
|
|
'currency': 'USD',
|
|
'items': [{
|
|
'item_id': 'SKU123',
|
|
'item_name': 'Product Name',
|
|
'price': 99.99
|
|
}]
|
|
});
|
|
|
|
// User properties
|
|
gtag('set', 'user_properties', {
|
|
'user_type': 'premium',
|
|
'plan_name': 'pro'
|
|
});
|
|
|
|
// User ID (for logged-in users)
|
|
gtag('config', 'GA_MEASUREMENT_ID', {
|
|
'user_id': 'USER_ID'
|
|
});
|
|
```
|
|
|
|
### Google Tag Manager (dataLayer)
|
|
|
|
```javascript
|
|
// Custom event
|
|
dataLayer.push({
|
|
'event': 'signup_completed',
|
|
'method': 'email',
|
|
'plan': 'free'
|
|
});
|
|
|
|
// Set user properties
|
|
dataLayer.push({
|
|
'user_id': '12345',
|
|
'user_type': 'premium'
|
|
});
|
|
|
|
// E-commerce purchase
|
|
dataLayer.push({
|
|
'event': 'purchase',
|
|
'ecommerce': {
|
|
'transaction_id': 'T12345',
|
|
'value': 99.99,
|
|
'currency': 'USD',
|
|
'items': [{
|
|
'item_id': 'SKU123',
|
|
'item_name': 'Product Name',
|
|
'price': 99.99,
|
|
'quantity': 1
|
|
}]
|
|
}
|
|
});
|
|
|
|
// Clear ecommerce before sending (best practice)
|
|
dataLayer.push({ ecommerce: null });
|
|
dataLayer.push({
|
|
'event': 'view_item',
|
|
'ecommerce': {
|
|
// ...
|
|
}
|
|
});
|
|
```
|
|
|
|
---
|
|
|
|
## Conversions Setup
|
|
|
|
### Creating Conversions
|
|
|
|
1. **Collect the event** - Ensure event is firing in GA4
|
|
2. **Mark as conversion** - Admin > Events > Mark as conversion
|
|
3. **Set counting method**:
|
|
- Once per session (leads, signups)
|
|
- Every event (purchases)
|
|
4. **Import to Google Ads** - For conversion-optimized bidding
|
|
|
|
### Conversion Values
|
|
|
|
```javascript
|
|
// Event with conversion value
|
|
gtag('event', 'purchase', {
|
|
'value': 99.99,
|
|
'currency': 'USD'
|
|
});
|
|
```
|
|
|
|
Or set default value in GA4 Admin when marking conversion.
|
|
|
|
---
|
|
|
|
## Custom Dimensions and Metrics
|
|
|
|
### When to Use
|
|
|
|
**Custom dimensions:**
|
|
- Properties you want to segment/filter by
|
|
- User attributes (plan type, industry)
|
|
- Content attributes (author, category)
|
|
|
|
**Custom metrics:**
|
|
- Numeric values to aggregate
|
|
- Scores, counts, durations
|
|
|
|
### Setup Steps
|
|
|
|
1. Admin > Data display > Custom definitions
|
|
2. Create dimension or metric
|
|
3. Choose scope:
|
|
- **Event**: Per event (content_type)
|
|
- **User**: Per user (account_type)
|
|
- **Item**: Per product (product_category)
|
|
4. Enter parameter name (must match event parameter)
|
|
|
|
### Examples
|
|
|
|
| Dimension | Scope | Parameter | Description |
|
|
|-----------|-------|-----------|-------------|
|
|
| User Type | User | user_type | Free, trial, paid |
|
|
| Content Author | Event | author | Blog post author |
|
|
| Product Category | Item | item_category | E-commerce category |
|
|
|
|
---
|
|
|
|
## Audiences
|
|
|
|
### Creating Audiences
|
|
|
|
Admin > Data display > Audiences
|
|
|
|
**Use cases:**
|
|
- Remarketing audiences (export to Ads)
|
|
- Segment analysis
|
|
- Trigger-based events
|
|
|
|
### Audience Examples
|
|
|
|
**High-intent visitors:**
|
|
- Viewed pricing page
|
|
- Did not convert
|
|
- In last 7 days
|
|
|
|
**Engaged users:**
|
|
- 3+ sessions
|
|
- Or 5+ minutes total engagement
|
|
|
|
**Purchasers:**
|
|
- Purchase event
|
|
- For exclusion or lookalike
|
|
|
|
---
|
|
|
|
## Debugging
|
|
|
|
### DebugView
|
|
|
|
Enable with:
|
|
- URL parameter: `?debug_mode=true`
|
|
- Chrome extension: GA Debugger
|
|
- gtag: `'debug_mode': true` in config
|
|
|
|
View at: Reports > Configure > DebugView
|
|
|
|
### Real-Time Reports
|
|
|
|
Check events within 30 minutes:
|
|
Reports > Real-time
|
|
|
|
### Common Issues
|
|
|
|
**Events not appearing:**
|
|
- Check DebugView first
|
|
- Verify gtag/GTM firing
|
|
- Check filter exclusions
|
|
|
|
**Parameter values missing:**
|
|
- Custom dimension not created
|
|
- Parameter name mismatch
|
|
- Data still processing (24-48 hrs)
|
|
|
|
**Conversions not recording:**
|
|
- Event not marked as conversion
|
|
- Event name doesn't match
|
|
- Counting method (once vs. every)
|
|
|
|
---
|
|
|
|
## Data Quality
|
|
|
|
### Filters
|
|
|
|
Admin > Data streams > [Stream] > Configure tag settings > Define internal traffic
|
|
|
|
**Exclude:**
|
|
- Internal IP addresses
|
|
- Developer traffic
|
|
- Testing environments
|
|
|
|
### Cross-Domain Tracking
|
|
|
|
For multiple domains sharing analytics:
|
|
|
|
1. Admin > Data streams > [Stream] > Configure tag settings
|
|
2. Configure your domains
|
|
3. List all domains that should share sessions
|
|
|
|
### Session Settings
|
|
|
|
Admin > Data streams > [Stream] > Configure tag settings
|
|
|
|
- Session timeout (default 30 min)
|
|
- Engaged session duration (10 sec default)
|
|
|
|
---
|
|
|
|
## Integration with Google Ads
|
|
|
|
### Linking
|
|
|
|
1. Admin > Product links > Google Ads links
|
|
2. Enable auto-tagging in Google Ads
|
|
3. Import conversions in Google Ads
|
|
|
|
### Audience Export
|
|
|
|
Audiences created in GA4 can be used in Google Ads for:
|
|
- Remarketing campaigns
|
|
- Customer match
|
|
- Similar audiences
|