GTM
How to implement Visible Privacy with Google Tag Manager.
This installation guide is valid for Google Tag Manager via Template. If you encounter any problem during the installation, feel free to send an email to [email protected]
Implementing Visible Privacy with Google Tag Manager
Visible Privacy offers a comprehensive solution for managing cookie consent on websites using Google Tag Manager (GTM). This guide will walk you through the process of deploying Visible Privacy on your GTM-enabled website.
Prerequisites
Before beginning, ensure you have:
- Created a GTM account.
- Set up a website container in GTM.
- Added the GTM container snippet to your website.
Installing the Consent Banner
To add the Visible Privacy consent banner to your website:
Download the Plugin
In Google Tag Manager, "plugins" are considered "templates". You'll need to download the Visible Privacy template (beautiful-consent-visible-privacy-cmp.tpl
). You can find it here.
Go to the Templates section of your GTM, and click the New button under Tag Templates.
Import the Visible Privacy CMP template to your workspace.
Save the template as it is.
Create a new Tag.
Go to the Tags section, add a New tag, and select "Beautiful Consent - Visible Privacy CMP" as the tag type, under the Custom section.
Enter your Client ID
Under the Tag Configuration section, enter your Client ID from your Visible Privacy account in the "ID" field. It will have a format like XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
.
Set a firing Trigger
Under the Triggering section, set the trigger to "Consent initialization - All pages".
Your new tag should look like this.
Save your new tag! 🚀
How Google Consent Mode works Info
Google Tag Manager includes several features that work together with Visible Privacy to help you manage how tags behave in response to the end user's consent choices.
Tags with built-in consent checks may still load regardless of consent, meaning data could be transmitted to Google without explicit permission. If this is a concern, configure tags with built-in consent with additional consent as well, so the tag will not load prior to consent.
Want to know more about Google Consent Mode v2? Read the official Documentation.
Consent Overview
For a complete overview of the consent settings applied to all tags in your container, you can enable the Consent Overview from your container settings.
Setting up Additional Consent Checks
Create a Custom Event trigger
In your GTM container, create the following Custom Event trigger to be used in your GTM configuration:
- Event Name:
vp_gtm_consent_update
- Event Type: Custom Event
- Fires On: All Custom Events
Don't use this trigger in the Visible Privacy Consent template.
Adjust Consent Settings
Edit the consent settings for all tags that need to be configured with additional consent.
- In the Tag Editor, go to
Advanced Settings > Consent Settings
. - Set to "Require additional consent for tag to fire".
Configure the tags you consider
To ensure the tag fires as soon as consent choices have been determined (either from a previous visit or from interaction with the banner), replace the normal "All Pages" trigger with the trigger created in step 1.
Updating Consent Mode settings does not trigger a reevaluation of tags with the "All Pages" trigger. If you don't use the vp_gtm_consent_update
trigger and keep "All Pages" instead, the tag will not fire on the first page if you didn't submit consent during a previous visit.
Publish your GTM container changes after configuration.