nod.

Consent and cookie banners (CMPs)

Wire your cookie banner to the nod. pixel so it respects your visitors' consent choices.

Updated July 31, 2026

The nod. pixel does not initialize measurement until analytics consent is explicitly granted. This article shows how to provide the initial state and keep it in sync when a visitor changes their choice.

The pixel reads an initial window.__nodConsent snapshot:

window.__nodConsent = {
  analytics: false,
  marketing: false,
  sale_of_data: false,
};

Missing fields remain unknown. Unknown and denied analytics consent both keep the pixel dormant. A grant starts first-party nod. collection from the current page. It does not replay landing parameters from time spent before consent.

Analytics and marketing are separate permissions. analytics: true starts nod. measurement. marketing and sale_of_data control provider matching and outbound sharing fields. Analytics consent never upgrades either one automatically.

Where the snippet goes

Set the initial snapshot in an inline script placed before the pixel <script> tag in your page's <head>. Then call the live API whenever your CMP changes:

<script>
  function syncNodConsent() {
    var state = {
      analytics: myCmp.hasConsent('analytics'),
      marketing: myCmp.hasConsent('marketing'),
      sale_of_data: myCmp.hasConsent('marketing')
    };
    window.__nodConsent = state;
    if (window.nod) window.nod('consent', state);
  }
  syncNodConsent();
  myCmp.onConsentChanged(syncNodConsent);
</script>
<script async src="https://YOUR_APP_URL/api/px/script" data-pixel-id="px_..."></script>

Replace the example methods and change callback with your CMP's real API. If it is not ready, set all permissions to false and update later. Do not guess a grant.

Shopify or a manual adapter

The Tracking settings page shows Shopify as the default e-commerce path and keeps manual code behind Other storefront or custom CMP.

CMPWhat it reads
Generic CMPInitial snapshot plus window.nod('consent', state) on every consent change
Cookiebotstatistics for analytics, marketing for marketing/data-sharing, updated on Cookiebot consent events
Shopify Customer Privacy APIBuilt in. No manual adapter. The pixel reads analyticsProcessingAllowed(), marketingAllowed(), and saleOfDataAllowed() and listens for visitorConsentCollected

Shopify does not need a parallel window.__nodConsent adapter. If a host adapter is present, it becomes authoritative, so do not install two competing sources. For other CMPs, follow the generic pattern and fail toward no collection until the actual state is available.

When analytics consent is unknown or denied, the pixel sends nothing and writes no nod. visitor, session, touch, or engagement state. This is not an event flagged as non-consented. No attribution beacon leaves the browser.

On withdrawal, it stops collection, clears nod. cookies/localStorage, and sends no final engagement beacon. On Shopify, it also removes or denies the existing _nod_* cart identity attributes through a same-origin cart update. Previously stored server data follows the workspace retention and deletion process.

Because dormant visits never produce an event, nod. cannot calculate a true consent rate from pixel traffic alone. The dashboard can report the adapter state and consent attached to received events, not invent a denominator for visitors it was prohibited from observing.

Your responsibility as the merchant

nod. provides the technical gate. Whether you need a banner, what counts as valid consent, and which visitors must see it depends on your market and legal setup. This article is not legal advice. Configure your CMP categories first, then map those exact decisions into the nod. consent state.