Tracking & attribution
Meta Pixel and CAPI, GA4, Hyros, and custom page code.
Site-level tracking
Open a website dashboard's Tracking / Attribution tab, or use get_site_tracking and update_site_tracking. Settings apply to public published HTML across the website. Private previews suppress tracking injection. PUT replaces the full settings object; read existing settings first and preserve fields you are not changing.
Providers and events
- Meta: Pixel / Dataset ID, browser Pixel switch, CAPI switch, write-only access token, and optional test event code. Supported events are PageView and accepted form Lead, with matching event IDs where the browser callback supports them.
- GA4: Measurement ID and enabled switch. This installs the browser tag; it does not import GA4 reports.
- Hyros: enabled switch and complete Universal Script. This injects browser code; it is not a Hyros server integration.
- Custom code: headerCode and footerCode strings. Header code runs before the built-in tracking runtime so a consent setup can establish its state.
Per-page tracking and custom code
Use Add page override in Tracking / Attribution. Exact paths such as / or /thank-you inherit site settings by default. Trailing slashes and index.html normalize to the same page; nested pages need their own override. Enter decoded paths without query strings, fragments, wildcards, percent escapes or dot segments.
API/MCP: settings.pageOverrides is an array of up to 50 objects. Each needs path. metaEnabled, capiEnabled, ga4Enabled and hyrosEnabled accept inherit, enabled or disabled. Browser provider IDs/scripts come from the site configuration. CAPI can be enabled on a page only while site CAPI is enabled with its saved token.
Each page has headerCode/footerCode and headerMode/footerMode. append (default) adds after site code, replace uses only page code, disabled emits no custom code in that position. Header code executes before the built-in tracking runtime. Removing an override restores site inheritance. Combined settings are limited to 95 KB; each snippet stays limited to 30,000 characters.
Read current settings before replacing them through update_site_tracking. Omitting pageOverrides resets them to an empty list. Changes affect public delivery within the existing 30-second cache window; previews never run these snippets. PageView and accepted Lead CAPI respect page-level disabling on the server.
Write-only Meta token
Omit accessToken to preserve the stored token. Supply accessToken to replace it. Use removeToken: true only with CAPI disabled. get_site_tracking returns tokenConfigured, never the token. Tokens are encrypted server-side and excluded from source revisions, delivery configuration, and audit metadata.
Consent and coverage
Built-in browser Meta and GA4 honor GPC, Do Not Track, and window.__basTrackingConsent === false. Custom and Hyros code require their own consent controls. CAPI is best-effort with no durable retry queue. Booking and purchase events are not mapped. Verify real provider reception and customer consent requirements with your own account before enabling tracking.