Consent For Analytics And Ads Tags
When consent is on for a container, its advertising and analytics tags load and send nothing until the visitor accepts your consent banner. Your triggers still decide when a tag fires. Consent decides whether it may run.
Consent applies to the Advertising and Analytics tag types, such as
Meta Pixel, Google Analytics 4, and TikTok Pixel. Other tag types,
including Report Conversion and custom tags, aren’t affected.
Before you start
- your site has a consent banner that supports Google Consent Mode. Most do, including Cookiebot, OneTrust, Usercentrics, and CookieYes
- you can edit the container
How consent works
Nitoriq reads the visitor’s choice from your banner through Google Consent Mode:
- Advertising tags wait until
ad_storageis granted. - Analytics tags wait until
analytics_storageis granted.
When you turn consent on, nothing is granted until the banner says so, for every visitor.
A tag that fires before the visitor answers waits. Nitoriq keeps up to 50 waiting calls per container on a page, with the values they had when they fired.
- If the visitor accepts, the waiting calls are sent in order.
- If the visitor declines, the waiting calls are dropped, and later calls aren’t sent.
- If the visitor withdraws consent later on the page, later calls stop. Meta and TikTok are also told to stop tracking.
The platform’s library isn’t loaded until a tag for it may run, so nothing is requested from the platform before consent. Google tags receive your banner’s consent choices too.
Turn on consent for a container
Check that it works
Open your page with ?niq_debug=1 to see the debug overlay:
consent (consent mode update): ad_storage granted, …shows each changemeta waiting for consent: ad_storagemeans a call is waitingmeta sent — consent grantedmeans a waiting call was sentmeta dropped — consent denied: ad_storagemeans a waiting call was droppedmeta not sent — consent denied: ad_storagemeans a new call wasn’t sent
In the browser’s network panel, no requests to the platform should appear before you accept the banner.
Consent is set up when
- consent is on in the container’s
Consentsetting - the debug overlay shows consent changes when you use the banner
- no platform requests appear before you accept the banner
- tags that fired before you answered are sent when you accept
- tags aren’t sent after you decline
Things to know
- Your banner must use Google Consent Mode. A banner that doesn’t use it never grants consent, so the tags never run. In that case, leave consent off and use trigger conditions on your banner’s data layer values instead.
- One page, several containers. Use the same consent setting in every container on a page. Google’s tag is shared, and whichever container loads it first sets its consent default.
- Your site’s own tags aren’t covered. A pixel your site installs itself follows your banner’s own integration, not Nitoriq’s setting.
Was this page helpful?