PrivacyQuick

All documentation pages ↓

Install PrivacyQuick with Google Tag Manager

Put the banner in your page's head, not inside the container. Then let GTM's consent settings decide which tags may fire, using the Consent Mode signals the banner sends.

If your tracking tags live in Google Tag Manager, you don't tag each script by hand. PrivacyQuick sends Google Consent Mode v2 signals to the dataLayer, and GTM checks those signals before it fires a tag. You don't need a CMP template from the gallery.

1. Put the banner in the page, above GTM

Paste your PrivacyQuick snippet directly into the site's <head>, above the GTM container snippet:

<head>
  <script src="https://cdn.privacyquick.com/v1/privacy.js" data-site-id="pq_xxxxxxxxxx" async></script>
  <!-- Google Tag Manager snippet goes below -->
</head>

The banner tag loads with async, so on a fast connection GTM could still start first. To make the order certain, add the inline consent default above both. It's the same snippet the dashboard shows under your install code:

<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('consent','default',{ad_storage:'denied',ad_user_data:'denied',ad_personalization:'denied',analytics_storage:'denied',functionality_storage:'denied',personalization_storage:'denied',security_storage:'granted',wait_for_update:500});</script>

Can you load the banner from inside GTM instead? It works, with a Custom HTML tag on the Consent Initialization trigger, but we don't recommend it. The banner then depends on GTM loading, appears later, and disappears for visitors whose browser or ad blocker blocks GTM. If you have no access to the site's HTML and must do it this way, keep the inline default out of that tag and set the default with a consent-default tag that fires first.

2. Turn on the consent overview

  1. In GTM, open Admin → Container Settings and tick Enable consent overview.
  2. Go to Tags and click the shield icon. You'll see which tags have consent configured and which don't.

3. Set consent for each tag

Tag typeWhat to do
Google tags (GA4, Google Ads, Floodlight, Conversion Linker)Nothing. They have built-in consent checks and adjust to the signals by themselves.
Advertising tags from other vendors (Meta Pixel, LinkedIn, TikTok, Pinterest)In the tag's Advanced Settings → Consent Settings, choose Require additional consent for tag to fire and add ad_storage.
Analytics tags from other vendors (Hotjar, Microsoft Clarity)Same setting, with analytics_storage.
Chat widgets, embedded players and similarSame setting, with functionality_storage.
Custom HTML tagsWork out what the code does and require the matching signal, as above.

The signals map to the banner's categories like this: Analytics controls analytics_storage; Advertising controls ad_storage, ad_user_data and ad_personalization; Functional controls functionality_storage and personalization_storage.

A signal can only be granted if your banner offers its category. If you require ad_storage for a tag but the banner has no Advertising category, that tag never fires. Check the categories on the dashboard's Banner tab; see Cookie categories.

4. Fire tags as soon as the visitor accepts

GTM checks consent when a trigger fires. A tag on the Page View trigger that was held back at page load doesn't fire on that page when the visitor clicks Accept; it fires on the next page view. To fire it straight away, add this to your page (or a Custom HTML tag on All Pages):

<script>
document.addEventListener('pq:consent', function (e) {
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({ event: 'pq_consent_update', pq_categories: e.detail.categories.join(' ') });
});
</script>

Then create a Custom Event trigger with the event name pq_consent_update and add it to the tags that should fire after a choice, alongside their Page View trigger. The consent settings from step 3 still apply, so a tag fires only if its signal was granted. This event fires when a visitor makes a choice, not on every page load.

5. Test in preview mode

  1. Click Preview in GTM and open your site through Tag Assistant, in a browser profile with no stored choice.
  2. Select the first event and open the Consent tab. Every signal except security_storage should start as denied for a visitor in an opt-in region.
  3. Check that your non-Google tags show as blocked by consent, not fired.
  4. Click Accept all on the banner. A consent update appears, followed by pq_consent_update, and the held-back tags fire.
  5. Publish the container.

Blocking Google tags completely

With the setup above, Google tags still load before consent and send cookieless pings, which Google calls advanced Consent Mode. If you want nothing sent to Google until the visitor agrees, add analytics_storage or ad_storage as an additional consent requirement on the Google tags too. Google Consent Mode v2 explains the difference.

For background on consent in GTM, read Google Tag Manager and consent and the longer GTM install walkthrough.