Comprehensive Google Analytics 4 guide covering property setup, events, custom events, recommended events, custom dimensions, user tracking, audiences, reporting, BigQuery integration, gtag.js implementation, GTM integration, Measurement Protocol, DebugView, privacy compliance, and data management. Use when working with GA4 implementation, tracking, analysis, or any GA4-related tasks.
/plugin marketplace add henkisdabro/wookstar-claude-code-plugins/plugin install henkisdabro-marketing-marketing@henkisdabro/wookstar-claude-code-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/audiences.mdreferences/bigquery.mdreferences/custom-dimensions.mdreferences/custom-events.mdreferences/data-management.mdreferences/debugview.mdreferences/events-fundamentals.mdreferences/gtag.mdreferences/gtm-integration.mdreferences/measurement-protocol.mdreferences/privacy.mdreferences/recommended-events.mdreferences/reporting.mdreferences/setup.mdreferences/user-tracking.mdGoogle Analytics 4 (GA4) is Google's event-based analytics platform for measuring user interactions across websites and applications. This comprehensive skill provides guidance on all aspects of GA4 - from initial property setup through advanced analysis, implementation methods, and compliance.
GA4 uses an event-based data model where every user interaction is tracked as an event with associated parameters. This differs from the session-based model of Universal Analytics, providing more flexibility and cross-platform measurement capabilities.
Invoke this skill for any GA4-related task, including:
Setup and Configuration:
Implementation:
Events and Tracking:
Analysis and Reporting:
Advanced Topics:
Option A: Google Tag Manager (Recommended)
1. Install GTM container on website
2. Create Google Tag with GA4 Measurement ID
3. Trigger: Initialisation - All Pages
4. Publish container
Option B: gtag.js Direct
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
gtag('event', 'button_click', {
'button_name': 'Subscribe',
'button_location': 'header'
});
What are you trying to do?
Setting up GA4 for the first time?
-> references/setup.md
Understanding how events work?
-> references/events-fundamentals.md
Implementing standard tracking events?
-> references/recommended-events.md
Creating business-specific custom events?
-> references/custom-events.md
Making parameters appear in reports?
-> references/custom-dimensions.md
Implementing User ID / cross-device tracking?
-> references/user-tracking.md
Building audiences for remarketing?
-> references/audiences.md
Analysing data in GA4 reports?
-> references/reporting.md
Exporting to BigQuery for SQL analysis?
-> references/bigquery.md
Installing via gtag.js directly?
-> references/gtag.md
Setting up GA4 in Google Tag Manager?
-> references/gtm-integration.md
Sending events from server/backend?
-> references/measurement-protocol.md
Testing and debugging implementation?
-> references/debugview.md
Implementing GDPR/Consent Mode?
-> references/privacy.md
Configuring Admin settings?
-> references/data-management.md
GA4 tracks everything as events. Four categories:
| Category | Description | Examples |
|---|---|---|
| Automatic | Fire without configuration | session_start, first_visit |
| Enhanced Measurement | Toggle on/off in settings | scroll, click, file_download |
| Recommended | Google-defined with standard parameters | purchase, login, sign_up |
| Custom | Business-specific tracking | demo_requested, trial_started |
| Limit | Value |
|---|---|
| Event names per property | 500 distinct |
| Parameters per event | 25 |
| Event name length | 40 characters |
| Parameter name length | 40 characters |
| Parameter value length | 100 characters |
| Custom dimensions (event-scoped) | 50 |
| Custom dimensions (user-scoped) | 25 |
| Custom dimensions (item-scoped) | 10 |
| Audiences per property | 100 |
Reference: references/setup.md
Create GA4 accounts, properties, and data streams. Covers account hierarchy, property configuration, data stream setup for web/iOS/Android, and initial configuration settings.
Reference: references/events-fundamentals.md
Understand GA4's event-based architecture. Covers the four event categories, event structure, parameter scopes (event/user/item), naming conventions, and limits.
Reference: references/custom-events.md
Create business-specific events beyond recommended events. Covers naming conventions, parameter design, industry patterns (SaaS, education, media), and implementation examples.
Reference: references/recommended-events.md
Implement Google-defined recommended events. Covers engagement events (login, sign_up), monetisation events (purchase, add_to_cart), and the items array structure for ecommerce.
Reference: references/custom-dimensions.md
Transform event parameters into reportable dimensions. Covers registration workflow, scope selection (event/user/item), custom metrics, calculated metrics, and troubleshooting.
Reference: references/user-tracking.md
Implement User ID and cross-device tracking. Covers User ID setup, user properties, Reporting Identity options, cross-domain tracking, and data deletion.
Reference: references/audiences.md
Create segments for analysis and remarketing. Covers audience conditions, predictive audiences, sequence conditions, membership duration, and Google Ads export.
Reference: references/reporting.md
Analyse data using standard reports and Explorations. Covers report types, exploration techniques (funnel, path, cohort), segments, comparisons, and attribution models.
Reference: references/bigquery.md
Export raw event data to BigQuery for advanced analysis. Covers linking setup, table schema, SQL query patterns, UNNEST operations, and cost optimisation.
Reference: references/gtag.md
Implement GA4 directly using gtag.js without GTM. Covers installation, gtag commands (config, event, set), common patterns, and framework integration.
Reference: references/gtm-integration.md
Implement GA4 using Google Tag Manager. Covers configuration tags, event tags, triggers, variables, data layer integration, and Preview mode testing.
Reference: references/measurement-protocol.md
Send events server-side using the Measurement Protocol API. Covers authentication, request format, validation, Python/Node.js/PHP examples, and best practices.
Reference: references/debugview.md
Test and validate GA4 implementation. Covers enabling debug mode, reading DebugView interface, validation workflows, and troubleshooting common issues.
Reference: references/privacy.md
Implement GDPR/CCPA compliance. Covers Consent Mode v2, consent parameters, regional settings, data deletion, and integration with consent management platforms.
Reference: references/data-management.md
Configure GA4 Admin settings. Covers data retention, data filters, user permissions, property settings, enhanced measurement, and key events (conversions).
video_tutorial_watched| Topic | File |
|---|---|
| Property Setup | references/setup.md |
| Events Fundamentals | references/events-fundamentals.md |
| Custom Events | references/custom-events.md |
| Recommended Events | references/recommended-events.md |
| Custom Dimensions | references/custom-dimensions.md |
| User Tracking | references/user-tracking.md |
| Audiences | references/audiences.md |
| Reporting | references/reporting.md |
| BigQuery Export | references/bigquery.md |
| gtag.js Implementation | references/gtag.md |
| GTM Integration | references/gtm-integration.md |
| Measurement Protocol | references/measurement-protocol.md |
| DebugView Testing | references/debugview.md |
| Privacy Compliance | references/privacy.md |
| Data Management | references/data-management.md |
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.