PixelPair documentation

Google and consent

GA4 and GTM are disabled until configured. GA4 accepts up to ten distinct Measurement IDs, loads gtag.js once, disables its automatic PageView and sends one explicit PageView to the configured IDs. Use the debug toggle for a disposable site's DebugView check. The optional HTTPS server container URL is passed as server_container_url; the loader still comes from Google's official domain. GTM supports an optional HTTPS loader base URL and a data-layer-only mode. Both integrations default to pixelpairDataLayer; use different layers if the integrations should be independent. Avoid configuring duplicate GA4 tags in GTM while the direct GA4 integration is active.

PixelPair uses basic consent mode: no external Google loader until the required consent is granted. GA4 needs statistics; Meta needs marketing; GTM needs both because the owner controls the container. Consent Mode v2 defaults precede Google configuration; all four storage/user-data/personalization signals update after a decision changes. The owner can require Google consent explicitly, independently of the global denied-until-consent setting. pixelpair_google_consent_denied filters that site policy. pixelpair_consent_marketing and pixelpair_consent_statistics can veto their respective categories. Fast/strict cache behavior remains as documented in development.md. After withdrawal, PixelPair sends no new events in that category and updates any loaded Google queues. Already-loaded third-party scripts cannot be unloaded; configure the container's own consent requirements and avoid unrelated tags that fire independently of PixelPair.

WP Consent API has priority when present, and an undefined consent type blocks tracking. Otherwise direct adapters read Cookiebot's responded categories, Complianz's category API, CookieYes's completed decision, Borlabs v3 configured service IDs, or Real Cookie Banner configured unique service names. Missing services, missing APIs and exceptions remain unresolved. Real Cookie Banner's result must contain a recognized service as well as a completed, affirmative choice; its API otherwise treats a nonexistent service as opted in. Its synchronous API is checked every 500 ms while detected to catch both grant and withdrawal. No CMP cookie formats are guessed. These adapters are tested against documented API fixtures; installed commercial CMP versions remain separate compatibility checks. A custom integration may dispatch pixelpair:consent with boolean marketing and/or statistics fields. A detected CMP's actual decision remains authoritative.

No unconditional GTM noscript iframe is emitted: a browser-only decision cannot authorize a no-JavaScript request. No-consent-tool behavior is the granted default, with the existing dismissible administrator recommendation and owner denial option.

Download the generated GTM JSON from Connections → Tag Manager → Advanced. It contains native GA4 event tags, one custom-event trigger per automatic event, data-layer variables and a constant Measurement ID placeholder. Import into a fresh workspace, replace G-REPLACE_ME, inspect the diff and test in Preview before publishing. Export contains no saved tokens or secrets. Structural/reference tests pass locally; actual GTM import and live DebugView/Preview are not asserted by mocked network tests. Custom event names need their own GTM tags.

Protocol references checked during implementation:

Google command messages use the documented Arguments object protocol. PixelPair queues denied defaults, then waits up to ten seconds for SDK readiness before updating consent and emitting configuration/events. Withdrawal during loading prevents a late event. Loading failure does not consume event/rule success markers; reload after resolving a blocked dependency. Shutdown removes outstanding listeners and timers.