A clean Complianz Google Tag Manager setup has three parts: Complianz loads your GTM container, the Complianz tag template in GTM sets default consent on the Consent Initialization trigger, and every non-Google tag waits for a Complianz consent event. Google tags such as GA4 and Google Ads stay on All Pages and adjust themselves through consent mode. Below is the step-by-step setup, the triggers to use, how to test it, and the mistakes I fix most often.

Complianz is one of the most popular cookie consent plugins for WordPress, and Google Tag Manager is where most sites keep their tracking. Getting the two to talk properly is where things go wrong. In sites I’m asked to check, the usual problems are a second GTM container nobody knew about, a Meta pixel firing before consent, or GA4 showing almost no traffic because consent never updates.

This guide covers the Complianz Google Tag Manager setup the way Complianz documents it, step by step,, plus the checks I run before calling it done. It’s the setup I use on client sites that need a consent banner and GTM working together.

If you haven’t added GTM to WordPress yet, start with my guide to Google Tag Manager on WordPress, which also explains consent mode basics. Here I’ll go straight to the Complianz part. One note before we start: I’m a developer, not a lawyer. Which consent rules apply to your site depends on where your visitors are, so check that with someone qualified.

How a Complianz Google Tag Manager setup works

The idea is simple once you see the order things happen in. Complianz holds the banner and the visitor’s choices. GTM holds the tags. Consent mode is the language between them.

Complianz Google Tag Manager consent flow, from page load to tags firing
What happens, in order, when a visitor lands on the page.
  1. The page loads. Complianz inserts the GTM container, so GTM is only added once.
  2. Consent Initialization fires first. The Complianz template tag sets the default consent state before any other tag runs.
  3. Google tags load on All Pages. GA4 and Google Ads read the consent state and, while it’s denied, send measurements without cookies.
  4. The visitor makes a choice on the banner.
  5. Complianz updates consent and pushes a custom event into the data layer for each accepted category.
  6. Non-Google tags fire on those events, for example a Meta pixel on the marketing event.

Google’s own Tag Manager consent help page explains why step two matters: the Consent Initialization trigger always fires before all other tags, and it’s meant for tags that set or update consent, such as a consent platform’s tag.

Google consent mode lets Google tags change their behavior based on the visitor’s choices. Google’s consent mode overview lists the consent types:

Consent typeWhat it controls
ad_storageStorage, such as cookies, related to advertising
ad_user_dataSending user data to Google for online advertising
ad_personalizationPersonalized advertising
analytics_storageStorage related to analytics, such as visit duration
functionality_storageStorage that supports site features, such as language settings
personalization_storageStorage related to personalization, such as recommendations
security_storageStorage related to security, such as authentication and fraud prevention

Google also describes two modes. In basic consent mode, Google tags are blocked until the visitor interacts with the banner. In advanced consent mode, Google tags load straight away with consent denied by default, send cookieless measurements, and switch to full measurement once consent is granted. Google says advanced mode gives an advertiser-specific model for conversion modeling, while basic uses a general model.

The Complianz Google Tag Manager setup in Complianz’s guide is the advanced approach for Google tags. That’s why GA4 and Ads stay on the All Pages trigger instead of waiting for a consent event. For Google consent mode on WordPress more broadly, the same rule holds with any consent plugin: Google tags read consent, other tags wait for it.

Before you start: clean up the site

Most broken Complianz Google Tag Manager setups I see fail before the wizard is even opened, because the site already has tracking added in other ways. Complianz’s Simplified Guide to Google Consent Mode v2 lists these steps first, and I agree with every one:

  • Remove manually added Google scripts. Delete GTM or gtag snippets pasted into the theme, a header plugin or a child theme. Complianz should add GTM.
  • If you use GTM4WP, set its container code to off, so the snippet comes from Complianz only, and turn off the GTM4WP integration under Complianz, Integrations, Plugins.
  • If you use Site Kit, follow Complianz’s separate Site Kit guide. Site Kit and Complianz both want to place Google code, so the order matters.
  • Check caching and optimization plugins. Complianz warns that JavaScript delay features in plugins such as WP Rocket or LiteSpeed can break consent mode. Exclude Complianz scripts from delay and combine settings.

Also check your plan before starting any Complianz Google Tag Manager work. Complianz’s consent mode guide says its steps require Complianz Premium, while the free plugin’s listing on WordPress.org mentions Google Tag Manager support and Consent Mode v2 support. Plan details change, so confirm what your version offers before you build the Complianz Google Tag Manager setup on top of it.

Step 1: connect Google Tag Manager in Complianz

The WordPress half of a Complianz Google Tag Manager setup happens in the Complianz wizard. Complianz’s guide gives these steps:

  1. Go to Wizard, Consent, Statistics.
  2. Select “Yes, and Google Tag Manager fires this script”, then click Save and Continue.
  3. On the Statistics Configuration page, enter your GTM container ID (it starts with GTM-).
  4. Answer Yes to “Will you be using our Tag Manager template?”
  5. Finish the rest of the wizard and publish the banner.

If some options on the Statistics Configuration page are greyed out, Complianz says an integration such as Site Kit, MonsterInsights, Google Analytics for WooCommerce or GTM4WP is probably enabled under Complianz, Integrations. Turn it off or follow the matching guide.

There’s also an option, “Do you want to force the script in the header?”, for placing GTM in the head. Complianz warns it can break configurations and integrations with other plugins, so I only turn it on when there’s a clear reason.

Step 2: add the Complianz template in Google Tag Manager

Now switch to GTM. The second half of a Complianz Google Tag Manager setup happens in the container itself:

  1. Open your container and go to Tags, New.
  2. Click Tag Configuration, then Discover more tag types in the community template gallery.
  3. Search for Complianz, open the template and click Add to workspace.
  4. On the Default Consent State screen, keep the defaults. Complianz says they’re preconfigured for Consent Mode v2.
  5. Set the trigger to Consent Initialization – All Pages.
  6. Save the tag.

That last trigger is the most important setting in the whole Complianz Google Tag Manager setup. Every web container includes the Consent Initialization – All Pages trigger by default, so you don’t need to create it.

Step 3: set up GA4 and Google Ads tags

In a Complianz Google Tag Manager setup, Google tags are the easy part, because they have built-in consent checks. Google’s consent mode overview lists the Google tag, Google Analytics, Google Ads, Floodlight and Conversion Linker among them. So in a Complianz Google Tag Manager setup using advanced mode, you don’t block these tags. You let them load and read consent.

  • Give your Google tag (GA4) the All Pages trigger.
  • Give Google Ads conversion and remarketing tags their normal triggers, such as All Pages or a conversion event.
  • Don’t add Complianz consent events as triggers for these tags.

Complianz’s guide is very clear on one point, and it’s where I see the most mistakes: All Pages is not the same as Consent Initialization – All Pages. Google tags get All Pages. The Complianz template gets Consent Initialization. If a Google tag runs on Consent Initialization, it can fire before the default consent state exists, and consent mode has nothing to work with.

In a Complianz Google Tag Manager setup, tags without built-in consent checks, such as the Meta pixel, LinkedIn Insight, Microsoft Clarity added as custom HTML, or a chat widget, need to be blocked until the visitor agrees. Complianz does this with custom events in the data layer:

Complianz GTM consent categories and their custom event triggers
Each Complianz category pushes its own event. Non-Google tags fire on these.
Complianz categoryCustom event nameExample tags
Functionalcmplz_event_functionalTags the site needs to work
Preferencescmplz_event_preferencesTags that remember visitor preferences
Statisticscmplz_event_statisticsNon-Google analytics tools
Marketingcmplz_event_marketingMeta pixel, LinkedIn Insight, other ad pixels

To use them, create a trigger in GTM: choose Custom Event under Other, and enter the event name exactly, for example cmplz_event_marketing. Then set that trigger on the tag, and remove any All Pages trigger from it. Complianz’s definitive guide to Tag Manager and Complianz also mentions a GTM container download in the plugin that imports the Complianz triggers and variables for you.

One more rule from Complianz: it doesn’t support GTM’s “additional consent checks” for these tags, so don’t assign consent mode purposes to them. Rely on the Complianz events only. Mixing both methods is a common reason a Complianz GTM pixel either never fires or fires too early.

What about US visitors?

Most of my clients’ sites target the US, so this question comes up a lot with every Complianz Google Tag Manager setup. Complianz shows different banners by region. In its Tag Manager guide, Complianz notes that in the EU the site loads with only functional cookies by default, while in opt-out regions all categories trigger before consent by default.

In practice, that means a US visitor may see tags fire right away, with an option to opt out, while an EU visitor sees nothing fire until they accept. Complianz’s WordPress.org listing also says it respects Do Not Track and Global Privacy Control signals from browsers. Your Complianz Google Tag Manager setup should be tested from both an EU and a US point of view, because the behavior is meant to be different.

Which regions you need to support is a legal question, not a technical one. Set the Complianz regions to match the advice you’ve been given, then test your Complianz Google Tag Manager setup in each one.

How to test your Complianz Google Tag Manager setup

Never trust a Complianz Google Tag Manager setup you haven’t tested. These are the checks I run, in this order:

  1. Open the site in a private window and don’t touch the banner.
  2. Open GTM Preview mode (Tag Assistant) and confirm the Complianz template tag fired on Consent Initialization, before anything else.
  3. Check consent states before a choice. Complianz’s guide says only security_storage and functionality_storage should show as granted at this point.
  4. Check the Meta pixel and other non-Google tags did not fire.
  5. Accept all on the banner and confirm the consent states change to granted and the cmplz_event_marketing and cmplz_event_statistics events appear.
  6. Confirm the non-Google tags now fire on those events.
  7. Look at GA4 network requests. The gcs parameter shows consent state, for example G100 before consent and G111 after accepting all. Complianz’s guide covers this check in more detail.
  8. Reject all in a fresh window and confirm marketing tags stay blocked.

Also view the page source once and search for “GTM-“. You should find your container ID loaded once. Two containers, or the same container twice, means something is still adding GTM outside Complianz, and the Complianz Google Tag Manager setup isn’t finished.

Common Complianz Google Tag Manager mistakes

MistakeWhat happensFix
GTM added by Complianz and by another pluginContainer loads twice, tags double countRemove the extra snippet, let Complianz add GTM
Complianz template on All PagesDefault consent set too lateUse Consent Initialization – All Pages
GA4 on Consent InitializationTag fires before consent defaults existMove GA4 to All Pages
Meta pixel on All PagesPixel fires before consentUse the cmplz_event_marketing trigger
JavaScript delay on Complianz scriptsBanner or consent updates breakExclude Complianz from delay settings
Workspace not publishedNothing changes on the live siteSubmit and publish the GTM container

The double container is the Complianz Google Tag Manager problem I find most often. A theme option, a header plugin, Site Kit or GTM4WP adds GTM, and then Complianz adds it again. Complianz’s own changelog mentions fixing a case where Site Kit inserting the container led Complianz to add a second one, which shows how easy this is to get wrong.

A Complianz Google Tag Manager checklist

Before I hand over a Complianz Google Tag Manager setup, every item on this list has to be true. Print it, or paste it into your project notes:

  • GTM is loaded once, by Complianz, and no other plugin or theme option adds it.
  • The Complianz template tag is in the container, on Consent Initialization – All Pages, with default settings.
  • GA4 and Google Ads tags use their normal triggers and rely on consent mode.
  • Every non-Google tag uses a Complianz custom event as its only trigger.
  • Caching and optimization plugins exclude Complianz scripts from JavaScript delay.
  • The banner regions match the advice you’ve been given for your audience.
  • Preview mode shows correct consent states before and after a choice.
  • The GTM workspace is published, and the published version is noted with a short description.

I also write down which tags exist and which trigger each one uses. When someone adds a new pixel six months later, that note is what keeps the Complianz Google Tag Manager setup clean. Without it, the next person usually puts the new tag on All Pages, and it fires before consent.

If you manage several sites, keep the same structure on each one. A Complianz Google Tag Manager setup that follows one pattern everywhere is much faster to audit than a different arrangement on every site.

Who should not use this setup

A Complianz Google Tag Manager setup is overkill for some sites, and that’s fine. If you only run GA4 and no ad pixels, a consent plugin talking directly to Google Analytics may be enough. Complianz’s guide covers that as a separate scenario, without GTM. And if you don’t use WordPress, Complianz isn’t an option at all.

It’s also not a one-time job. Each new tag you add to GTM needs the right trigger. If several people add tags to your container, agree a rule: Google tags on their normal triggers, everything else on a Complianz event. Otherwise the setup slowly drifts back to tags firing before consent.

Frequently asked questions

How do I set up Complianz Google Tag Manager integration?

In the Complianz wizard, go to Consent, Statistics, select that Google Tag Manager fires the script, enter your container ID on the Statistics Configuration page and choose to use the Complianz Tag Manager template. Then add the Complianz template tag in GTM on the Consent Initialization – All Pages trigger.

Which trigger should GA4 use with Complianz GTM?

GA4 and other Google tags should use the All Pages trigger. They have built-in consent checks and adjust to the consent state. Only the Complianz template tag uses Consent Initialization – All Pages.

How do I block the Meta pixel until consent with Complianz?

Create a Custom Event trigger in GTM for cmplz_event_marketing and use it as the pixel’s only trigger. Remove any All Pages trigger from that tag.

Does Complianz support Google consent mode on WordPress?

Yes. Complianz documents Consent Mode v2 support with Google Tag Manager and Google Analytics. Its step-by-step consent mode guide says those steps require Complianz Premium, so check your plan.

Should I keep GTM4WP with Complianz?

You can, but Complianz recommends setting the GTM4WP container code to off so Complianz adds the snippet, and turning off the GTM4WP integration in Complianz’s Integrations settings.

How can I check that my Complianz Google Tag Manager setup works?

Use GTM Preview mode in a private window. Before any choice, only security and functionality storage should be granted. After accepting, consent should update and the Complianz events should fire.

I set up GA4, Google Tag Manager and consent-aware tracking on WordPress sites and test every tag in preview mode before handing over. See my technical SEO and tracking service, where GA4 and GTM setup starts at $49 and fixes are $15 an hour, or send me your site and what you track.