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.
Google Analytics 4 (GA4) is Google's event-based analytics platform for measuring user interactions across websites and applications. Every user interaction is tracked as an event with associated parameters, providing flexible cross-platform measurement.
Invoke this skill for any GA4-related task:
<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? -> 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 in 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/value length | 40 / 100 characters | | Custom dimensions (event/user/item) | 50 / 25 / 10 | | Audiences per property | 100 |
G-XXXXXXXXXX (G- prefix + 10 alphanumeric characters)Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer