Audit tracking & cookie consent (GDPR / Consent Mode v2)
audit_tracking_consentDetect tracking tags and cookies firing before consent or after rejection, plus broken GA4/GTM tags and duplicate page views, to verify GDPR cookie compliance and diagnose inaccurate analytics data.
Instructions
Loads the site in a real browser three ways (no click, Reject, Accept all) and reports which tags fire before consent or after Reject, tracking cookies set without consent, Google Consent Mode v2 signals, broken GA4/GTM tags, duplicate page_views and missing conversions. Returns a score, prioritised plain-English fixes and a link to the full HTML report. Use for GDPR/UK GDPR/PECR/ePrivacy cookie compliance and "why is my analytics data wrong" questions. Runs on the caller's own Apify account (APIFY_TOKEN) and is billed by Apify pay-per-event; nothing is charged by this server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public website URL, e.g. "https://example.com" (https:// is added if missing). Private/internal addresses are rejected. | |
| locale | No | Browser language, e.g. en-GB, de-DE, fr-FR (banners are often localised). | en-GB |
| scanMode | No | "full" = 3 visits (no click / Reject / Accept all). "quick" = 1 visit, cheaper: tag inventory, pre-consent tracking and broken tags only. | full |
| waitSecs | No | How long to wait for results before returning status "running" with a runId (the scan keeps going; use get_audit_results). Default 240. | |
| maxCostUsd | No | Spend cap for this run on YOUR Apify account (forwarded to Apify as maxTotalChargeUsd). Default from server config ($2). | |
| timezoneId | No | IANA time zone, e.g. Europe/London, Europe/Berlin, America/New_York. | Europe/London |
| internalPages | No | Extra internal pages to check per scenario (0 = home page only). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run | Yes | ||
| check | Yes | ||
| grade | Yes | ||
| score | Yes | ||
| dryRun | Yes | true = sample data from the built-in mock, NOT a real scan | |
| status | Yes | "running" = the Actor is still working; call get_audit_results with run.runId later | |
| target | Yes | ||
| metrics | Yes | ||
| summary | Yes | ||
| findings | Yes | ||
| reportUrl | No | Full report (HTML/JSON) in the Apify key-value store | |
| datasetUrl | No | ||
| findingsTotal | Yes | ||
| severityCounts | Yes |