Validate tracking
validate_trackingCompare gtag or dataLayer events from your codebase against GA4 data to find fired, missing, or unexpected events and likely causes.
Instructions
Compare tracking events found in the codebase against actual GA4 data.
Takes the event names found in the codebase's gtag('event', ...) or dataLayer.push calls and checks which ones actually fire in GA4.
Returns matched events with their GA4 counts, events missing from GA4, unexpected GA4 events, auto-collected events (page_view, session_start, etc.), insights on likely causes, and the date range.
Google Analytics Data API: https://developers.google.com/analytics/devguides/reporting/data/v1 and Google Ads API: https://developers.google.com/google-ads/api/docs/start
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| property_id | No | GA4 property as "properties/123456789" (see get_account_summaries). If empty, uses the default from config. | |
| date_range_end | No | End date, same formats as date_range_start. | today |
| expected_events | Yes | Event names found in the codebase, e.g. ["sign_up", "purchase"]. | |
| date_range_start | No | Start date: "today", "yesterday", "NdaysAgo" (e.g. "28daysAgo"), or "YYYY-MM-DD". | 28daysAgo |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||