1. Knowledge base
  2. Scripts & cookies

Google Consent Mode

Steps to take to enable Google Consent Mode with your Clym widget manually if you do not have the blockingJS on your website

If you use any Google products on your website (Google Analytics, Google Advertising Products, etc.), enabling Google Consent Mode is an essential step to comply with data privacy regulations while still delivering personalized ads and user experiences. This feature allows websites and applications to adjust their tracking and advertising practices based on a user's cookie consent preferences set in the Clym widget, reducing the risk of unwanted data collection and privacy violations. By default, if you have blockingJS on your website already, then Google Consent Mode will be rolled out automatically. However, if you do not have this already on your website, you will need to follow the steps below to manually enable Google Consent Mode.

Once enabled, Google Consent mode interacts with the Clym widget to receive your website visitors' consent preferences and ensures that these preferences are preserved across the website pages they visit.

 

How does it work?

When a page loads before consent has been given, Clym sends a negative consent signal to Google by default for website visitors in the EU/UK.❌

If consent is given, Clym sends a positive consent signal to Google.✅

 

Enabling Google Consent Mode is an easy 3-step process:

 

 

1. Inject default consent signal script

First, copy the script below and inject this before Google Tag Manager on your website.

window.dataLayer = window.dataLayer || [];
  if (!window.gtag) function gtag() { dataLayer.push(arguments); }
  gtag('consent', 'default', {
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'ad_storage': 'denied',
    'analytics_storage': 'denied',
    'wait_for_update': 500,
  });

 

 

 

2. Access services in the Clym Portal

Please sign into your Clym Portal account. From the left side menu, select Website Settings. From here, you will see a list of all your domains, each with its unique settings.

Website Settings Information 1

Click the settings wheel next to the domain that you would like to change the default language for. This will open the website settings for that specific domain.

Website Settings Information 2

From the Website settings menu, select the Services drop-down arrow to view the scripts. In the bottom right corner, click Add Services.

services2

 

 

 

3. Add services for Google Consent Mode Advertising and Google Consent Mode Analytics

You will need to repeat step 3 to create two individual services for Google Consent Mode Advertising and Google Consent Mode Analytics. In the pop-up window that appears, please fill out all of the required fields marked with an asterisk.

Under the Script tab, add each value below into the Javascript code field for the service you are creating.

Name: Google Consent Mode Advertising

gtag('consent', 'update', {
      ad_user_data: 'granted',
      ad_personalization: 'granted',
      ad_storage: 'granted',
    });

Name: Google Consent Mode Analytics

gtag('consent', 'update', {
      analytics_storage: 'granted'
    });

If Clym has set up Google Consent Mode automatically, the two new services created for Google Consent Mode Advertising and Google Consent Mode Analytics will send positive signals to Google. You can also view your actual values using Google Tag Manager's preview functionality. For more information on how to check if Google Consent Mode has been enabled properly, please click here.

If you encounter any challenges, please reach out to us at support@clym.io.