agentleFS
0-shiv0-shiv/secondstep-claude-skills/skills/ga4-audit-claude/SKILL.md

ga4-audit-claude

Skill2 starsChanged 9 months agoMITView on GitHub

This is the master skill file for the GA4 Audit Claude Code skill. It routes /ga4 commands to the appropriate sub-skill. Before running any audit, understand the core GA4 data model. GA4 uses an event-based data model, replacing the session/pageview model from Universal Analytics. Everything is an event. Four event categories: 1. Automatically collected events — first_visit, session_start, page_view (web), screen_view (app), user_engagement 2. Enhanced measurement events — scroll, click (outbound), view_search_results, video_start, video_progress, video_complete, file_download 3. Recommended events —…

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before running any audit, understand the core GA4 data model.

    line 25
  2. Distinctive:

    Must start with a letter

    line 98
  3. Very specific:

    No reserved prefixes (firebase_, ga_, google_, gtag.)

    line 99
  4. Distinctive:

    When running a full audit, execute sub-skills in this order:

    line 109
  5. Distinctive:

    All audit findings follow this structure:

    line 150

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GA4 Audit — Main Skill

Command Routing

This is the master skill file for the GA4 Audit Claude Code skill. It routes /ga4 commands to the appropriate sub-skill.

Available Commands

CommandSub-skillDescription
/ga4 auditAll sub-skillsFull property audit across all dimensions
/ga4 streamsga4-data-streamsAudit data stream configuration
/ga4 eventsga4-eventsAudit event implementation
/ga4 conversionsga4-conversionsAudit conversion setup
/ga4 audiencesga4-audiencesAudit audience configuration
/ga4 attributionga4-attributionAudit attribution settings
/ga4 ecommercega4-ecommerceAudit e-commerce tracking
/ga4 dimensionsga4-custom-dimensionsAudit custom dimensions
/ga4 reportingga4-reportingAudit reports and explorations
/ga4 integrationsga4-integrationsAudit Google product links
/ga4 reportga4-reportGenerate final audit report

GA4 Fundamentals

Before running any audit, understand the core GA4 data model.

Event-Based Model

GA4 uses an event-based data model, replacing the session/pageview model from Universal Analytics. Everything is an event.

Four event categories:

  1. Automatically collected events — first_visit, session_start, page_view (web), screen_view (app), user_engagement
  2. Enhanced measurement events — scroll, click (outbound), view_search_results, video_start, video_progress, video_complete, file_download
  3. Recommended events — Google-defined names with expected parameters (e.g., purchase, sign_up, generate_lead)
  4. Custom events — User-defined events for business-specific actions

Sessions

A session begins with session_start and ends after 30 minutes of inactivity (configurable). Unlike UA, sessions do NOT restart at midnight or on new campaign parameters by default.

Key session metrics:

  • session_start — Fires once per session
  • engagement_time_msec — Accumulated active time
  • engaged_sessions — Sessions lasting >10 seconds, with a conversion, or with 2+ page/screen views
  • engagement_rate — engaged_sessions / sessions

Users

GA4 tracks three user identity spaces:

  1. User ID — Your authenticated user identifier (most accurate)
  2. Google Signals — Cross-device tracking for signed-in Google users
  3. Device ID — Client ID from _ga cookie (least accurate)

Reporting identity hierarchy (configurable):

  • Blended: User ID > Google Signals > Device ID > Modeling
  • Observed: User ID > Google Signals > Device ID
  • Device-based: Device ID only

Engagement

GA4 replaces bounce rate with engagement metrics:

  • Engaged session: >10 seconds OR conversion event OR 2+ page views
  • Engagement rate: Percentage of engaged sessions (replaces inverse bounce rate)
  • Average engagement time: Mean active time per session

Recommended Events Reference

All business types:

  • login, sign_up, share, search, select_content

E-commerce:

  • view_item_list, select_item, view_item, add_to_wishlist
  • add_to_cart, remove_from_cart, view_cart
  • begin_checkout, add_shipping_info, add_payment_info
  • purchase, refund
  • view_promotion, select_promotion

Lead generation:

  • generate_lead, form_submit, qualify_lead

SaaS / Apps:

  • sign_up, tutorial_begin, tutorial_complete
  • spend_virtual_currency, earn_virtual_currency
  • level_start, level_end, level_up
  • unlock_achievement, post_score

Content / Media:

  • page_view, scroll, video_start, video_progress, video_complete
  • file_download, click

Travel:

  • search, view_item, begin_checkout, purchase

Event Naming Rules

  • Snake_case only (e.g., add_to_cart, NOT AddToCart)
  • Maximum 40 characters
  • Must start with a letter
  • No reserved prefixes (firebase_, ga_, google_, gtag.)
  • Maximum 500 distinct event names per property
  • Maximum 25 custom parameters per event
  • Parameter names: max 40 characters
  • Parameter values: max 100 characters

Orchestration

Full Audit Flow (/ga4 audit)

When running a full audit, execute sub-skills in this order:

  1. Data Streams — Foundation check (stream config, filters, retention)
  2. Events — Event coverage and quality
  3. Conversions — Conversion event setup
  4. E-commerce — E-commerce funnel (if applicable)
  5. Custom Dimensions — Dimension registration
  6. Audiences — Audience configuration
  7. Attribution — Attribution model settings
  8. Reporting — Report and exploration setup
  9. Integrations — Google product linking
  10. Report — Compile findings into scored report

Audit Input Requirements

For each audit, you need:

  • GA4 Property ID (format: properties/XXXXXXXX)
  • Business type (e-commerce, lead gen, SaaS, content, travel)
  • Website URL
  • GTM container ID (optional but recommended)
  • Google Ads account ID (if running paid traffic)

Health Score Calculation

Health Score = (
    streams_score * 0.10 +
    events_score * 0.20 +
    conversions_score * 0.15 +
    audiences_score * 0.10 +
    attribution_score * 0.10 +
    ecommerce_score * 0.15 +
    dimensions_score * 0.10 +
    integrations_score * 0.10
) * 100

Each dimension score is 0.0 to 1.0 based on checklist completion percentage.

Output Format

All audit findings follow this structure:

## [Dimension Name] Audit

**Score: XX/100**

### Passed Checks
- [x] Check description

### Failed Checks
- [ ] Check description
  - **Impact**: High/Medium/Low
  - **Current**: What is currently configured
  - **Recommended**: What should be configured
  - **Fix**: Step-by-step instructions

### Warnings
- [!] Warning description

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.