Skip to main content
All CollectionsGoogle consent mode v2
Set up Google consent mode v2 using WordPress plugin
Set up Google consent mode v2 using WordPress plugin

Learn how to set up the Cookie Information WordPress plugin for Google consent mode v2.

Updated over a week ago

In this article, we’ll walk you through setting up the Cookie Information WordPress plugin for Google consent mode v2.

Before you start

Here are a few things to know before you start:

  • This guide shows you how to install the Cookie Information WordPress plugin and use it for setting up Google consent mode v2. This instruction applies for setting up the WordPress plugin with the advanced Google consent mode v2. To implement the basic mode, see our Google consent mode v2 guide.

  • This guide also covers instructions on how to configure and update the Cookie Information WordPress plugin. The regular updates are crucial for maintaining the security and functionality of your WordPress plugins.

  • Google consent mode v2 processes the consent preferences of your users obtained through your consent popup. It adjusts the functioning of analytics, ads, and third-party tags responsible for creating or accessing cookies based on these preferences.

    There are two different modes available in this version: basic and advanced. You can implement both in Cookie Information. The basic consent mode doesn’t allow you to collect any user data, not even consent status, until the user agrees. In the advanced consent mode, Google tags are loaded before the consent popup displays to users. Google collects cookieless data without personal identifiers.

  • If your site is set up with a single default language, our plugin will automatically detect it. If you need more than one language, apart from setting it up in Cookie Information, you’ll need to set up an additional plugin, for example the WPML plugin. You can find instructions on the plugin's official page.

  • To learn how to customize your cookie consent template, see this style guide.

Set up the WordPress plugin

To set up the Cookie Information WordPress plugin, follow these steps:

1. Log in to your WordPress account.

2. In your Dashboard, navigate to Plugins.

3. Click Add New Plugin.

4. Type ‘Cookie Information’ inthe search bar.

search for Cookie Information WordPress plugin

5. Click Install Now.

Note: You can also find the Cookie Information plugin for WordPress here.

Instal Cookie Information Consent mode wordpress plugin

6. Click Activate.

Activate Cookie Information consent solution plugin for WordPress

Note: There’s another way to activate the plugin.

Go to Installed Plugins, find Cookie Information - Consent Solution in the list, and click Activate.

7. In Dashboard, go to Cookie Information plugin settings.

8. (Optionally) Turn on Enable Autoblocking of YouTube and Vimeo to blockYouTube and Vimeo iframe automatically before consent.

9. (Optionally) Turn on the IAB TCF v2 option, if you use the IAB Transparency & Consent Framework (IAB TCF 2.2) with Google consent mode v2.

Turn on the IAB TCF v2 option in Cookie Information Consent solution WordPress plugin

10. Turn on Consent Pop-up and Enable Google Consent Mode v2.

Cookie Information Consent solution WordPress plugin settings

11. In the GCM Code Snippet, you can adjust the code to your consent requirements.

GCM Code Snippet in Cookie Information WP plugin

12. Log in to Cookie Information.

13. Go to Consent solutions.

14. Find the consent solution where you want to change the consent popup template.

Choose consent solution in Cookie Information

15. Navigate to Pop-up appearance and click the Template drop-down list under Change template.

16. Choose Overlay v2 - Google consent mode v2 and Overlay v3 - Google consent mode v2.

Choose Overlay v2 - Google consent mode in Cookie Information

The default versions of overlay v2 and v3 without any customization look like this:

Cookie consent banner templates in Cookie Information

View our template showcase to see all template designs. To learn how to customize your template, see this style guide.

Note: Changing your template will reset any customizations including text or styling, you have made earlier.

17. (Optionally) If you use a different cookie consent template or create a custom one, you need to add a link to Google’s business data responsibility site to meet Google’s requirements.

In Pop-up appearance, go to Advanced options. Add the following code to your template’s HTML code:

​<a class="coi-banner__google-privacy-policy" aria-label="{{{translations.google_privacy_policy_link}}}" href="https://business.safety.google/privacy/" target="_blank">{{{translations.google_privacy_policy_link}}}</a>

Advanced options of cookie consent template in Cookie Information

18. Make sure that the main installation code in the source code of your website contains data-gcm-version attribute with the value set to "2.0". We recommend placing the code in the <head> tag to ensure that the script is loaded first and the cookies can be blocked before consent has been given.

The main installation code will look like this:

<script id="CookieConsent" type="text/javascript" data-culture="EN" src="https://policy.app.cookieinformation.com/uc.js" data-gcm-version="2.0"></script>

Note: The attribute data-culture = "EN" controls the language in which the popup will appear on the page – in this example, it will be displayed in English. To change the language, set the data-culture attribute to a different language code. For more details, see this article.

Update the Cookie Information WordPress plugin

To update the Cookie Information WordPress plugin, follow these steps:

1. Go to your WordPress Dashboard.

2. Navigate to Installed Plugins.

3. Go to Cookie Information - Consent Solution plugin, where you will see a notification about the latest update available.

4. Click View version details to see the plugin’s changelog with the changes this release will bring.

Cookie nformation Consent solution WordPress plugin changelog

5. Click Update Now.

Note: WordPress will automatically download and install the update. During this process, the plugin might be temporarily deactivated and then reactivated.

6. All done! Your plugin is now updated.

Related articles

Did this answer your question?