Set up consent mode for CookieYes

After you’ve installed your consent banner, you'll need to enable 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. From the gallery, search for “CookieYes”, then install “CookieYes CMP” by cookieyeshq.
  4. In CookieYes, go to “Advanced Settings” and click Get Installation Code. From the code box, copy the bolded portion below. Your code will differ from the example provided.
https://cdn-cookieyes.com/client_data/5cfe4f28d3b2e213a2c75d46/script.js
  1. Paste the code into the “Website Key” field in Tag Manager.
  2. Configure the default settings you would like to use under “Default Consent Mode settings”.
  3. Add a row for global settings, and leave “Regions” blank. You can add additional rows for region-specific settings by using comma-separated ISO 3166-2 country codes in the “Region” box.
  4. Click Add, then click Triggering.
  5. Select “Consent Initialization - All Pages”, then click Save.
  6. Click Preview in the top right corner to test your container. View instructions for testing below.
  7. Publish your container.

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

  1. Open CookieYes, then go to “Advanced Settings” and click Get Installation Code.
  2. Copy the installation code snippet. If you use a website builder, review their documentation to find out how to implement code in the <head> tag of each page.
  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 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': 'denied',

  'ad_user_data': 'denied',

  'ad_personalization': 'denied',

  'analytics_storage': 'denied'

});

 

</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
903057709548183735
true
Search Help Center
true
true
true
true
true
73067
false
false
false