Google Consent Mode is a standard introduced by Google and become a requirement in certain regions to send data to Google Analytics 4 and Google Ads APIs. In order to learn more about the overall concept check out our blog post:

Google Consent Mode Explained

This guide explains how to use our simple Consent Mode Banner that comes in a FREE and PRO (paid) versions. This guide shows complete setup for PRO version but will be applicable for FREE as well.

Installation

Install and Activate the plugin from main WP Admin Plugins section.

Setup

Customise main content

Navigate to Settings > Consent Mode Banner. Use the first screen to customise the main content of the banner.

During initial configuration it is handy to select Enable only for admins? option. It allows to preview Consent Mode Banner without deploying it to all users.

The banner consists of two views:

Each description field accept simple Markdown syntax:

Buttons can be hidden by removing their text.

Optional – Google Tag Manager snippets

Second section of the main settings view allows to optionally install Google Tag Manager JS snippets. It is useful when integrating GTM, but can be skipped if:

Consent Types

Consent types are related to purpose of 3rd party tools using cookies and other tracking technologies. They explain reasons why certain user’s data is being processed. Each consent type is an entry in a table and it will be visible in the settings page of the consent mode banner. For each consent type you can specify:

Adjust Styling

The Consent Mode Banner styling is very lightweight and in most cases it should inherit and pick up global styles of the WP/Woo Theme, but if there is a need to adjust it’s look a separate text field allows to pass custom CSS rules.

For example you can style buttons look using following CSS selectors:

Example:

.consent-banner-button {
  color: #454545; /* color of buttons text */
  background-color: #333333; /* color of buttons background */
  border-color: #222222; /* color of buttons outline */
}

Enable Banner

Finally, when all settings are done and you are comfortable with the content and look of the consent mode banner you can able it for all users ensuring both settings are unchecked:

Advanced

Consent Settings / Withdrawal

Once user provides their consent preferences the Consent Mode Banner won’t be visible anymore. In most cases you would need to allow users to modify their consent preferences afterwards.

In order to do so, you can add a basic link anywhere on the page which will open the consent banner settings view again. Here is the link example:

Consent Preferences

You can modify the link text, but ensure the “href” param equals or ends with “#consent-banner-settings”. Here is an example how to add it to a default WordPress footer:

Google Tag Manager

Google Consent Mode works out-of-the-box with Google Tags:

It means the Content Mode Banner will work with those integrations when they are integrated directly via native plugins or using Google Tag Manager.

For other tags such as Facebook Pixel ensure correct Consent Checks are specified in Google Tag Manager Workspace. Lean more in following guide:

How to configure GTM Consent Mode?

When specifying additional consent checks on any GTM tag, ensure Consent Mode Banner is running and enabled before publishing changes in GTM. Otherwise, affected tags will never fire.

Cookies Deletion (PRO)

The PRO version of the Content Mode Banner has built-in cookies deletion feature that kicks in when user withdraw their initial consent. In this case the banner will try to match GA4, Google Ads, Facebook, Pinterest and TikTok cookies and delete them to reflect new choice of the user.