GTM

How to implement Visible Privacy with Google Tag Manager.

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.

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.

GTM Templates Section

Import the Visible Privacy CMP template to your workspace.

GTM Templates Section

Save the template as it is.

GTM Templates Section

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.

GTM Templates 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.

GTM Templates Section

Set a firing Trigger

Under the Triggering section, set the trigger to "Consent initialization - All pages".

GTM Templates Section

Your new tag should look like this.

GTM Templates Section

Save your new tag! 🚀


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.


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.

GTM Templates Section


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

GTM Templates Section

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".

GTM Templates Section

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.