Google Tag Manager runs your tags. Tags are small pieces of tracking code, such as Google Analytics, Google Ads or the Facebook Pixel. CookieFlame tells Tag Manager what each visitor has agreed to. This guide shows you how to set it up so each tag follows the visitor’s choice, and how to check that it works.
You’ll need:
CookieFlame sorts cookies into categories. Each category switches on one or more of Google’s “consent types”:
| When the visitor allows… | Google is told… |
|---|---|
| Preferences | functionality_storage and personalization_storage are granted |
| Analytics | analytics_storage is granted |
| Marketing | ad_storage, ad_user_data and ad_personalization are granted |
| Site statistics | nothing changes (this category doesn’t involve Google) |
| Necessary (always on) | security_storage is granted (it keeps the site secure) |
Until the visitor chooses, every type except security_storage is set to “denied”.
If the visitor’s browser sends a Global Privacy Control signal, the three advertising types stay denied, even after Accept All. They change only if the visitor switches Marketing on in their preferences, or opens Do Not Sell or Share My Personal Information on the US notice and clicks Allow selling or sharing. The opt-out is remembered on later visits, even if the signal is turned off.
What visitors see depends on their country:
You choose this in WordPress under CookieFlame → Tag Managers → Google Consent Mode.
That’s your decision.
ad_storageanalytics_storagefunctionality_storagead_storage: the tag then runs only when the visitor allows Marketing.What visitors get in Basic mode (EU, UK and other banner-first countries)
| The visitor… | What runs on that page |
|---|---|
| Hasn’t chosen yet (banner showing) | Tag Manager isn’t loaded, so none of its tags run |
| Clicks Accept All | All your tags |
| Allows Analytics only | Analytics tags. Advertising tags wait. |
| Allows Marketing only | Advertising tags. Google Analytics waits. A tag with no consent setting runs too, because Tag Manager is loaded. |
| Allows Preferences only, or clicks Decline All (or saves with everything switched off) | Tag Manager isn’t loaded, so none of its tags run |
| Allows more later on the same page | Tags Tag Manager has already skipped start on the next page |
| Comes back later | Their choice applies from the start of every page |
In the US and in countries with no banner, everything is allowed from the first page (Marketing stays off with a Global Privacy Control signal), so Tag Manager loads straight away. A US visitor who opts out turns off Marketing only, and your tags follow their consent settings.
Do steps 1, 3, 4 and 6 of section 3 first, then:
cookie_consent_marketing, and give the variable the same name. Save. Repeat for cookie_consent_statistics (it follows CookieFlame’s Analytics category).cookie_consent_update. Choose Some Custom Events, with the condition cookie_consent_marketing equals true for advertising tags, or cookie_consent_statistics equals true for analytics tags.cookie_consent_update.cookie_consent_update right after each choice, and at the start of every page once a visitor has chosen. So the tag runs on the page where they agree, and on every page after that.cookie_consent_update, and don’t set them to Once per page, or they’ll miss the second click.What visitors get in Advanced mode (EU, UK and other banner-first countries)
| The visitor… | Google’s own tags | Other tags with a consent setting |
|---|---|---|
| Hasn’t chosen yet | Load with consent denied and send measurements without cookies. AdSense and some Floodlight requests wait. | Wait |
| Clicks Accept All | Full measurement from that moment | Page-view tags run on the same page (through cookie_consent_update) |
| Allows Analytics only | Google Analytics measures in full. Google Ads keeps measuring without cookies. | Analytics tags run, advertising tags wait |
| Clicks Decline All (or saves with everything switched off) | Keep sending measurements without cookies | Don’t run |
In the US and in countries with no banner, everything is allowed from the first page, so both modes behave the same.
| Tag | Consent setting | Trigger in Basic | Trigger in Advanced |
|---|---|---|---|
| Google tag (GT- / G-) | No additional consent required | Keep the trigger it has (usually All Pages) | Unchanged |
| Google Analytics event tags | No additional consent required | Unchanged | Unchanged |
| Google Ads conversion and remarketing | No additional consent required | Unchanged | Unchanged |
| Conversion Linker | No additional consent required | All Pages | Unchanged |
| Floodlight | No additional consent required | Unchanged | Unchanged. Some Floodlight requests still wait for Marketing. |
| Facebook (Meta) Pixel PageView | Require ad_storage | All Pages | cookie_consent_update where cookie_consent_marketing equals true |
| LinkedIn Insight, TikTok, Pinterest, Snap or X page-view tags | Require ad_storage | All Pages | Same as the Meta PageView |
| Microsoft Clarity, Hotjar | Require analytics_storage | All Pages | cookie_consent_update where cookie_consent_statistics equals true |
| Click, form or purchase tags (any platform) | The same as that platform’s page-view tag | Their own trigger | Their own trigger, unchanged |
| Anything you’re unsure about | Require ad_storage | All Pages | Same as the Meta PageView |
Enter your ID in Microsoft Ads tag ID (UET) on the Tag Managers tab instead of adding UET in Tag Manager. CookieFlame starts Microsoft’s tag only when Marketing is allowed, in both modes. In the EU, UK and other banner-first countries, that means once the visitor allows Marketing. In the US and in countries with no banner, Marketing is allowed from the first page, so the tag starts straight away, unless the visitor opts out or their browser sends a Global Privacy Control signal. Microsoft may show a warning about a missing consent signal.
ad_storage, analytics_storage, ad_user_data and ad_personalization. security_storage shows Granted.ad_storage, ad_user_data and ad_personalization stay Denied even after Accept All, and your advertising tags don’t run. Firefox private windows, Brave and DuckDuckGo send this signal by default. To see Granted, test in a Chrome or Edge private window.cookie_consent_marketing and cookie_consent_statistics should match what you chose. (If you created the two variables in section 4, you can also see them on the Variables tab.)Seeing the US notice, or no banner? CookieFlame went by your country. Tag Assistant tests what a visitor from your own country gets. To test the banner that asks first from outside Europe, you need to browse from a European connection, for example with a VPN. CookieFlame remembers your country, and the choice it saved for you, until every private window is closed. So close all your private windows, connect the VPN, then open a new private window. The Preview tab in CookieFlame only shows how each banner looks.
cookie_consent_update trigger instead (section 4, step 3).cookie_consent_update on the same tag. A returning visitor sends both on every page, so the tag can fire twice. Use one or the other.cookie_consent_update.fbq('consent','revoke'). It stops that tag even after the visitor accepts. Remove that line.CookieFlame pushes cookie_consent_update to the dataLayer with three values, each true or false:
cookie_consent_preferencescookie_consent_statistics (CookieFlame’s Analytics category)cookie_consent_marketing (false while a Global Privacy Control opt-out applies)It’s sent:
It isn’t sent before a choice in the banner-first countries (section 1), or on excluded devices. When a visitor takes consent back, the page reloads and the new page sends it.
When CookieFlame adds Tag Manager (ID entered on the Tag Managers tab), CookieFlame’s Google consent default is in place before Tag Manager loads. When a visitor has already chosen (and always in Basic mode), cookie_consent_update comes just before Tag Manager’s own start event. In Advanced mode, Tag Manager starts before a new visitor chooses, and the event follows when they choose. So you don’t need a consent tag on the Consent Initialization – All Pages trigger. If Tag Manager is added by your theme or another plugin instead, CookieFlame holds it back, but entering the container ID on the Tag Managers tab is the most reliable way to keep this order.
Your settings are in WordPress under CookieFlame → Tag Managers (/wp-admin/admin.php?page=cookieflame&tab=tagmanagers on your own site).