Skip to Content
Tag ManagerTagsConsent For Analytics And Ads Tags

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.

Preparation

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

Nitoriq reads the visitor’s choice from your banner through Google Consent Mode:

  • Advertising tags wait until ad_storage is granted.
  • Analytics tags wait until analytics_storage is 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

Open the container, open Container actions, and choose Consent.

Turn on Wait for consent before running ad and analytics tags, then choose Save. The change applies to your site within a few minutes, with no publish needed.

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 change
  • meta waiting for consent: ad_storage means a call is waiting
  • meta sent — consent granted means a waiting call was sent
  • meta dropped — consent denied: ad_storage means a waiting call was dropped
  • meta not sent — consent denied: ad_storage means a new call wasn’t sent

In the browser’s network panel, no requests to the platform should appear before you accept the banner.

Validation

Consent is set up when

  • consent is on in the container’s Consent setting
  • 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?