Set up Cookie Information to obtain user consent

To capture valuable insights while protecting user privacy, you need to collect consent from your website users. We recommend you use a Consent Management Platform (CMP) or work with your Content Management System (CMS) to collect consent and send it to Google. 

Step 1: Set up a consent banner

  1. Sign up for a Cookie Information account.
  2. Configure your banner using the “Get Started” wizard.
  3. Make sure your banner complies with the requirements in the Google EU User Consent Policy (EUUCP).
For additional information on banner setup, refer to the Cookie Information implementation guide.

Step 2: Set up consent mode

Set up using Google Tag Manager

  1. Open Google Tag Manager and navigate to your container
  2. In “Tags”, click New and name the tag.
  3. Click Tag Configuration then click Discover more tag types in the Community Template Gallery.
  4. From the gallery search for “Cookie Information”, then install “Cookie Information + Consent Mode v2” by cookie-Information.
  5. In the configuration for the “Cookie Information template”, check the box next to “Add Cookie Information Consent Banner”.
  6. Configure any country-specific settings you’d like to use under “Default settings”. Create one row for each setting you’d like to override (default is denied), and use comma-separated ISO 3166-2 country codes in the Region box to indicate which regions/countries that row’s settings should apply to.
  7. Click Add, then click Triggering.
  8. Select “Consent Initialization - All Pages”, then click Save.
  9. Click Preview in the top right corner to test your container. View instructions for testing below.
  10. Publish your container.

Set up using another platform or directly from your website’s code

  1. From your Cookie Information account, go to “Installation” in the left sidebar. Copy the code from the code box.
  2. If you use a website builder, review their documentation to find out how to implement code in the “Head tag” of each page. Otherwise, skip to step 3.
  3. In the <head> tag of each page (review the instructions above if you use a website builder), paste the following code, followed by the CMP script you copied earlier at the very top of the <head> tag. Note that this step is critical in order to ensure the CMP functions properly.

<script>

// Define dataLayer and the gtag function.

window.dataLayer = window.dataLayer || [];

function gtag(){dataLayer.push(arguments);}

 

// IMPORTANT - DO NOT COPY/PASTE WITHOUT MODIFYING REGION LIST

//Set default consent for specific regions according to your requirements

gtag('consent', 'default', {

  'ad_storage': 'denied',

  'ad_user_data': 'denied',

  'ad_personalization': 'denied',

  'analytics_storage': 'denied',

 'regions':[<list of ISO 3166-2 region codes>]

});

// Set default consent for all other regions according to your requirements

gtag('consent', 'default', {

  'ad_storage': 'granted',

  'ad_user_data': 'granted',

  'ad_personalization': 'granted',

  'analytics_storage': 'granted'

});

 

</script>

<!--Banner script here!-->

Testing using Tag Assistant

Learn more about how to Troubleshoot consent mode with Google Tag Manager.

Was this helpful?

How can we improve it?
true
Achieve your advertising goals today!

Attend our Performance Max Masterclass, a livestream workshop session bringing together industry and Google ads PMax experts.

Register now

Search
Clear search
Close search
Main menu
6366955053221626327
true
Search Help Center
true
true
true
true
true
73067
false
false
false