✂️ Code Snippets and Termageddon have partnered up to provide you step-by-step instructions on how to set up compatibility with Google Consent Mode 🍪
- What Google Consent Mode is;
- The steps needed to set up compatibility with Google Consent Mode;
- The difference between Advanced vs Basic consent mode;
- How to test for proper implementation.
What is Termageddon?
Termageddon is an attorney founded website policies and consent solution platform that helps website owners keep their policies up to date with newly required disclosures as privacy laws change. As new laws go into effect, Termageddon notifies you by email and even has the ability to push newly required disclosures automatically to your policy pages, helping you avoid privacy related fines and lawsuits.
Special offer For Code Snippets users:
- If you own and manage your own websites, Termageddon is offering a discount for all new purchases for Code Snippets users.
- If you provide web design services to multiple customers, you can apply to be an agency partner to receive a complimentary license for your own website, as well as reseller/affiliate access in case you decide to ever recommend Termageddon to clients. Clients get protected, you make more recurring revenue, win win!
You do not need to use Termageddon to set up compatibility with Google Consent Mode; any properly built consent solution will suffice, and instructions will be very similar in nature to what is being shared with you in this article. We encourage you to research providers and select one who provides step-by-step instructions along with quality support, to ensure you get everything properly implemented.
Step-by-step Video Guide:
What’s happening? What is Google Consent Mode?
If you’re utilizing Google Tag Manager to fire multiple scripts, chances are you have been notified by Google that you need to set up compatibility with their new Consent Mode. If you haven’t received this notice, it is likely only a matter of time.
Due to privacy laws such as the Digital Markets Act, companies like Google, Facebook and Microsoft are now required to ensure their own users adhere to consent related privacy laws. This means if you are using products like Google Tag Manager, you may be required to set up compatibility with Consent Mode, otherwise Google may be penalized with a heavy fine.
Prerequisites
- Your WordPress website (with the Code Snippets plugin installed/activated)
- Your Termageddon license (with the consent solution activated)
- Your Google Tag Manager account (with the regular GTM script added to the <head> of your website)
Stage 1: Replace GTM script with new Consent Mode Script
Remove the original Google Tag Manager script from the <head> of your website:
Replace it with Google’s Consent Mode Script:
In your /wp-admin area of your website, go to Tools -> Termageddon + Usercentrics and then paste the code below in the Additional Scripts area:
Don’t forget to replace GTM-XXXXX with the correct ID
Do not change the body tag (pasted below for convenience):
Stage 2: Enable Consent Mode within Termageddon questionnaire, mark GTM as Essential
- Log into Termageddon: policies.termageddon.com
- Click into your license
- Click “Edit” for the Cookie Policy and Consent Tool
- Click ‘Enable’ for Google Consent Mode.
- Click ‘Google Tag Manager | Edit’ -> Under General, change the Category to Essential
- Run a sitemap scan if not already. Also you can add services manually via “Add Service” -> “Pre-Defined”.
Stage 3: Decide on advanced vs basic for Google related Tags
To put it simply: Basic = most privacy friendly, less data collection, more steps you have to take Advanced = not as privacy friendly, more data collection, less steps you have to take
The following Google Services currently support the Advanced Consent Mode:
Service |
Consent Type |
Conversion Linker |
ad_storage |
Display & Video 360 |
ad_storage |
Google Ads |
ad_storage |
Google Ads Conversion Tracking |
ad_storage |
Google Ads Remarketing |
ad_storage |
Google Analytics |
analytics_storage |
Google Analytics 4 |
analytics_storage |
Google Campaign Manager 360 |
ad_storage |
Search Ads 360 |
ad_storage |
Doubleclick Ad |
ad_storage |
DoubleClick Floodlight |
ad_storage |
Google Campaign Manager |
ad_storage |
NEXT STEPS
Stage 4: Set up Basic consent mode for all other (non Google related) Tags
- Navigate to Variables in the side-menu and then click on New.
- Name your variable. In this example, we will name it Google Analytics 4 Variable
- Add a new variable of type “Data Layer Variable“.
- Under Data Layer Variable Name, insert Google Analytics 4.
⚠️ Note: Correct spelling, hyphenation and capitalization are mandatory for this field. Every technology must be added the way it is spelled in the Usercentrics Admin Interface. Here: “Google Analytics 4”. - Click/enable Set Default Value and type in false
- Click Save
You have now set up the Google Analytics 4 variable. Repeat this process for any other Google Services you use, outlined in the tables above.
- Navigate to Triggers in the side-menu and click on New
- Add a title to your trigger. For this example, we will type in “Google Analytics 4 Trigger”
- Click Trigger Configuration and select Custom Event
- Click/enable Use regex matching
- Under Event Name, paste in (consent_status.*)
⚠️ Note: Correct spelling, hyphenation and capitalization are mandatory for this field. - Click/enable Some Custom Events
- In the drop-down menus, set the following condition: “Google Analytics 4 Variable” contains true.
⚠️ Explanation: The variable contains the user’s consent information (variable=true – user opted in || variable=false – user opted out) for a specific technology. Hence, the trigger should only be fired (and tag therefore activated), if the variable=true. - Click Save
Add the Trigger to the respective Tag
- You can choose to pause your existing tags and create new ones, or you can modify your existing tags where you will remove the existing trigger and replace it with the new trigger. In this example, we will update an existing Tag. You can still utilize the steps below if you are creating new tags (just remember to pause any existing tags prior to testing in the final step).
- Navigate to Tags in the side-menu and click on your Google Analytics 4 tag
- Remove the preexisting trigger(s) and replace it with the newly created “Google Analytics 4 Trigger”
- Click Save
Stage 5: Testing
Test via the Preview Feature. Don’t forget to clear out all cookies and do a hard refresh after making any changes. Cookies should only load on the browser after consent is given.
- Properly clear your browser cache when testing in preview mode. This is absolutely essential.
- Inspect the code of the website (via the Chrome browser) and go to “Applications” -> “Cookies” to see cookies load and confirm this only happens after consent is given.