OneTrust lives on your organisation’s marketing property and is expected to already be present on any surface where Nudj renders. Nudj reads the OneTrust consent state at runtime and conditions analytics loading on it.
What gets gated
Consent state gates every analytics provider Nudj ships to the browser:- PostHog — product analytics + session replay.
- Google Analytics — page views and events.
- Meta Pixel — advertising events.
- BetterStack session replay — frontend session replay telemetry.
How consent flows
OneTrust emits a consent state
OneTrust exposes a global object on the page enumerating the consent categories the user has granted (e.g.
C0001, C0002, C0003, C0004).Nudj reads consent before loading providers
The Nudj user app checks the consent state before initialising each analytics provider. A provider gated on a category the user hasn’t consented to never loads at all.
Per-organisation configuration
Cookie consent is organisation-level. An organisation can:- Enable or disable OneTrust integration entirely. Organisations without a OneTrust licence can opt out; without the integration active, Nudj falls back to the analytics configuration set elsewhere in the organisation.
- Map categories to providers. Each analytics provider is keyed to a consent category; the mapping is part of the organisation’s analytics configuration.
Propagation into embedded surfaces
The OneTrust integration also applies when the Nudj user app is embedded:- Shopify storefront widgets — the merchant’s OneTrust banner (on their storefront) gates the Nudj widgets’ analytics loading.
- Universal embed widget — the embedding page’s OneTrust state propagates to the embedded widget.
Verifying consent gating
From a test page:- Open the browser devtools Network panel.
- Load the page with OneTrust banner dismissed “reject all”.
- Confirm no requests to PostHog / GA / Meta Pixel fire.
- Reload with “accept all”.
- Confirm the providers’ requests now fire.
Related pages
Embedding modes
How the Nudj experience renders inside your surface.
Universal embed widget
The primary non-Shopify embed path.
Last reviewed: 2026-04 · Related PRs: #973

