How the code part works
AdLoop never reads your files, on AdLoop Cloud or self-hosted. Your AI client (Claude Code, Cursor, …) searches your codebase itself forgtag('event', …) and dataLayer.push({event: …}) calls, collects the event names, and passes that list to the tool. So the code comparison needs an AI client with access to the repository; in a chat without your code, your AI can still run the GA4, GTM and Ads checks.
The workflow
- Rule out consent first. In the EU, Ads usually shows several times more clicks than GA4 shows sessions because many visitors decline analytics cookies. That’s normal, not broken tracking; see consent and data gaps.
-
Is anything missing?
attribution_checkcompares the conversions Google Ads reports with what GA4 records, optionally for named events such assign_uporpurchase, and says whether a gap is explained by consent. -
Do your key events reach Google Ads?
check_key_event_importsmatches every GA4 key event with the Google Ads conversion actions that import it. It names key events nothing imports, imports used only as secondary conversions (reported, not bid on), imports that receive nothing while GA4 counts conversions from Google Ads traffic (a broken link or auto-tagging), and imports of events that are no longer key events. For the GA4 side alone,audit_ga4_propertychecks the property’s setup: retention, streams that stopped sending, key events that never fire. A missing link, import, primary setting or auto-tagging is fixed in one approval withdraft_conversion_tracking_setup(details). -
Code against GA4.
validate_trackingtakes the event names from your code and returns which ones GA4 receives, which are missing, which arrive without a code reference, and which GA4 collects automatically. It looks at the last 28 days by default. -
Code against GTM against GA4.
audit_event_coverageadds the live Tag Manager container and gives every event a status:Your AI drills into flagged tags and triggers with the Tag Manager tools. -
Fix it.
generate_tracking_codewrites a ready-to-paste gtag snippet, with Google’s recommended parameters for standard events and an optional form-submit, button-click or page-load listener, and checks whether the event already arrives in GA4. If an event arrives but isn’t a key event,draft_key_eventmarks it as one, through the usual preview and confirmation;draft_conversion_tracking_setupdoes that and everything Google Ads needs to bid on it.
Paid traffic against GA4
For “what do my ads really achieve?”:analyze_campaign_conversions: Ads clicks and cost per campaign against GA4 sessions and conversions, the real cost per conversion, and the click-to-session ratio as a consent indicatorlanding_page_analysis: paid sessions, conversion rate and engagement per ad landing page, including pages that get clicks but never convert. A slow page is worth a PageSpeed check.
Tools
attribution_check,check_key_event_imports,analyze_campaign_conversions,landing_page_analysis: Google Ads ↔ GA4 cross-checksvalidate_tracking: your code’s events ↔ GA4generate_tracking_code: gtag snippetsaudit_event_coverage: your code’s events ↔ live GTM container ↔ GA4draft_conversion_tracking_setup: links GA4 and Google Ads, marks key events, imports them as conversions (previewed)
tracking toolset, except audit_event_coverage, which belongs to gtm (toolsets). Parameters are in the tool reference.
Limits
- Tag Manager tags with a dynamic event name (
{{Event}}) and Custom HTML tags can’t be interpreted automatically; the audit lists them for a manual look. - The audit compares the published container. Unpublished edits show up in
get_gtm_workspace_diff. - On AdLoop Cloud,
analyze_campaign_conversions,landing_page_analysis,attribution_check,check_key_event_importsanddraft_conversion_tracking_setupuse Google Ads and count as Google Ads operations. The other tracking tools are unmetered. See plans and limits.