Skip to content

EARN UP TO 50% COMMISSION WITH OUR RESELLER ACCOUNTS + REGULAR PASSIVE INCOME SIGN UP TODAY

Install CookieScan

Install with Google Tag Manager

Load your cookie banner through the CookieScan template in Google Tag Manager, with the Consent Mode default set before any other tag fires.

Updated 5 min read

Applies to:
  • Cookie banner
  • Tag Manager & Consent Mode

https://cookiescan.com/help/install-with-google-tag-manager/ Β· Updated 12 October 2026

On this page

Before you start

You need:

  • Google Tag Manager on every page of your website, and permission to publish its container
  • every tracking tag on your website loading through Tag Manager
  • your website set up in the Portal

The CookieScan template works on every plan. It can't hold back a tag written straight into your website's code, because that tag runs before Tag Manager loads CookieScan. If you have tags like that, see Choose how to install CookieScan.

Copy your CookieScan ID

Your CookieScan ID is the key the template uses to load your banner. It has the form NN-NNNNNN.

  1. Open the Install Code window

    Go to Cookie Banner, then Install Code.

  2. Choose the Tag Manager tab

    Select Google Tag Manager Install.

  3. Copy the key

    Select Copy Key.

Turn off Auto-blocking

With Tag Manager, Google Consent Mode and Tag Manager's consent settings decide which tags fire, so Auto-blocking must be off.

  1. Open the banner settings

    Go to Cookie Banner, then Settings.

  2. Untick Auto-block cookies

    Untick Auto-block cookies. Leave Use Google Consent Mode ticked.

  3. Save your settings

    Select Save & Publish.

Add the CookieScan template

  1. Create a new tag

    In Tag Manager, open your container, go to Tags and select New.

  2. Open the Community Template Gallery

    Select Tag Configuration, then Discover more tag types in the Community Template Gallery.

  3. Add the CookieScan template

    Search for CookieScan, select the template, then select Add to workspace.

You can also open the CookieScan template in the Tag Manager Community Template Gallery.

Fill in the tag

You only need to fill in CookieScan ID. Leave the other fields as they are unless you need them.

FieldWhat to enter
CookieScan IDThe key you copied from the Portal.
Enable Google Consent ModeLeave it ticked. Untick it only if you don't use Consent Mode.
Default settingsOptional. Leave it empty to deny every consent type except security_storage everywhere, until the visitor chooses. security_storage is always granted.
Redact ads dataOptional, under Other Settings. Removes ad identifiers from Google Ads and Floodlight requests while ad storage is denied.
Pass ad click information through URLsOptional, under Other Settings. Keeps ad identifiers in your internal links while waiting for consent.

Set a different default by region

Use Default settings when you want a different starting point in different countries. Which regions start as denied is your decision.

Select Add Region to add a row for each group of regions. In each row:

  • Region takes country codes, such as GB, FR, or subdivision codes, such as US-CA, separated by commas.
  • The granted and denied columns take consent types, separated by commas.

List ad_storage, analytics_storage, ad_user_data and ad_personalization in every row, because a type left out of a row gets no default in those regions. Then add one row with a blank Region. It covers every region you haven't listed. When regions overlap, the most specific one wins.

This example denies by default in the UK, the EEA and Switzerland, and grants everywhere else:

RegionGranted consent typesDenied consent types
The country codes belowad_storage, analytics_storage, ad_user_data, ad_personalization
Blankad_storage, analytics_storage, ad_user_data, ad_personalization
Text
GB, AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IS, IE, IT, LV, LI, LT, LU, MT, NL, NO, PL, PT, RO, SK, SI, ES, SE, CH

Google explains how regions work in its guide to setting up Consent Mode.

Set the trigger

  1. Choose the trigger

    Under Triggering, choose Consent Initialization - All Pages.

  2. Save the tag

    Give the tag a name, such as CookieScan, and select Save.

This trigger fires before every other trigger, so the default is in place before Google tags run. Don't use All Pages or Initialization - All Pages.

Check it and publish

  1. Preview your container

    In Tag Manager, select Preview and open your website in Tag Assistant.

  2. Check the default

    Select the Consent Initialization event, then Consent. On-page Default shows the values you set.

  3. Check nothing updates yet

    No On-page Update appears until you select a button on your banner. This holds for a new visitor, so clear your website's cookies first if you have chosen on your banner before.

  4. Accept on your banner

    Select Accept all. A consent update with granted values appears.

  5. Publish the container

    Select Submit, then Publish.

Once visitors start making choices, the Dashboard shows Receiving consents. See Check your banner is working.

Update an older template

If you added the CookieScan template before, update it to get the latest version. In Tag Manager, open Templates, select the CookieScan template and select Update. Then publish your container.

How the template works

The CookieScan template:

  • sets the Consent Mode default through Tag Manager, before any other tag fires
  • applies a returning visitor's saved choice straight away
  • loads the CookieScan script, which shows your cookie banner
  • sends a consent update each time a visitor saves a choice

How categories map to Consent Mode shows which consent types each category controls.

Next steps

Was this article helpful?

Thanks for your feedback.

Please don't include personal details. We can't reply here.

Thanks for your feedback.

Please don't include personal details. We can't reply here.

Thanks, your comment has been sent.

Sorry, we couldn't record your feedback. Please try again later.

Still stuck?

Our support team can help with anything these guides don't cover. Tell us your CookieScan ID and the page address so we can look straight away.

Back to Install CookieScan