About google-analytics
A GA4 implementation and analysis skill for event tracking, configuration, and reporting. It also describes using the read-only analytics-mcp server for live data, while directing configuration changes to the GA4 UI or Admin API.
Key features
- 01GA4 setup and tracking installation
- 02Event categories and parameter guidance
- 03Ecommerce and cross-device tracking
- 04Custom reports and dimensions
- 05Read-only live data query guidance
Use cases
- 01Set up a GA4 property and data stream
- 02Plan custom events and report parameters
- 03Review ecommerce funnel tracking
- 04Analyze GA4 data with realtime reports
MCP support
The bundled analytics-mcp is a read-only MCP server for Data API reports, funnel and realtime reports, and account, property, custom-definition, and Google Ads link details. Configuration changes must be made through the GA4 UI or the external Admin API.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ henkisdabro/ wookstar-claude-plugins --skill google-analyticsAfter installing, type/google-analyticsin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/audiences.mdbigquery.mdcustom-dimensions.mdcustom-events.mddata-management.mddebugview.mdevents-fundamentals.mdgtag.mdgtm-integration.mdmeasurement-protocol.mdprivacy.mdrecommended-events.mdreporting.mdsetup.mduser-tracking.mdDetails
From the project READMEGoogle Analytics 4
GA4 is event-based: every interaction is an event with parameters. Pick the reference from the decision tree below and read it before answering anything beyond the Quick Start.
The bundled analytics-mcp server (Google's official GA MCP) is read-only: it runs Data API reports, funnel and realtime reports, and reads account, property, custom-definition and Google Ads link details. Use it to answer questions about live GA4 data; configuration changes are made in the GA4 UI or through the Admin API outside this server.
Quick Start
- Create property: analytics.google.com -> Admin -> Create -> Property
- Create data stream: Add web stream, note Measurement ID (G-XXXXXXXXXX)
- Install tracking (choose one):
- GTM (recommended): Install container, create Google Tag with Measurement ID, trigger on All Pages, publish
- 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>
- Verify: Enable GA Debugger extension, check Admin -> DebugView for session_start, page_view
- Send custom events:
gtag('event', 'button_click', { button_name: 'Subscribe', button_location: 'header' });
Decision Tree: Which Reference Do I Need?
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
Linking BigQuery / export schema? -> references/bigquery.md
Querying export data with SQL? -> the bigquery skill
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
Core Concepts
Event-Based Model
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 |
Key Limits
| Limit | Value |
|---|---|
| Distinct event names | 500 per app stream (no limit for web) |
| Parameters per event | 25 |
| Event name length | 40 characters |
| Parameter name/value length | 40 / 100 characters (page_location 1,000) |
| Custom dimensions (event/user/item) | 50 / 25 / 10 |
| Audiences per property | 100 |
Measurement ID
- Format:
G-XXXXXXXXXX(G- prefix + 10 alphanumeric characters) - Location: Admin -> Data Streams -> Web Stream
- Used in: gtag.js config, GTM tags, Measurement Protocol
Common Workflows
Ecommerce Tracking
- Review recommended events for the purchase funnel: view_item -> add_to_cart -> begin_checkout -> purchase
- Structure items array (required: item_id OR item_name; recommended: price, quantity, item_category)
- Test with DebugView, then register custom item parameters as custom dimensions
Cross-Device Tracking
- Implement User ID and configure Reporting Identity (Admin -> Data Settings)
- Set user properties and build cross-device audiences
GDPR Compliance
- Set up Consent Mode with default denied state
- Integrate with CMP (OneTrust, Cookiebot, etc.), update consent on user acceptance
- Test consent implementation with DebugView
Custom Reports
- Understand available data in reporting
- Register custom parameters as dimensions, create Explorations
- For unsampled data, export to BigQuery
Best Practices
- Naming: Use snake_case, be descriptive and action-oriented, keep under 40 characters, avoid generic names
- Implementation order: Enhanced Measurement -> recommended events -> custom events -> custom dimensions
- Data quality: Separate test/production properties, set up internal traffic filters from day one, document all custom events, audit regularly with DebugView, export to BigQuery for backup