Setup GTM "Consent Changed" Event

The "Consent Changed" event allows scripts managed by Google Tag Manager to immediately react to changes in the users consent when the make a selection in the Consent Manager Widget.

Prerequisites

Before setting up the "Consent Changed" event be sure to complete the following:

  1. In Polaris check the Publish Notices page and confirm that item #2 "Add Polaris Client-Side JavaScript to your website" is setup correctly. Most importantly check that the option enableConsentManager: true, is present.
  2. Complete the guide, "Setting Up Cookie Consent in Google Tag Manager"

Setup

Step 1: Create the "Consent Changed" Event


  1. Open up Google Tag Manager and open up the websites workspace you are configuring
  2. In the left navigation bar, select Triggers
  3. In the Triggers window, click New
  4. A window will pop up from the right side, name the trigger "Consent Changed" by clicking on the text "Untitled Trigger" and modifying it.
  5. Hover over Trigger Configuration and click the edit button which appears in the upper right corner.
  6. A pop up opens from the right, scroll down to "Other" and select Custom Event
  7. Under "Event Name" enter consentChoice
  8. Leave the setting "This trigger fires on" set to All Custom Events
  9. In the upper right click Save

Step 2: Enable Consent Overview

Google Tag Manager has introduced a feature called Consent Overview that allows users to quickly check the consent settings of all their tags at once, as well as make bulk edits to consent settings so that you don’t have to click into each tag individually. For sites with dozens of tags operating, using this feature can save a lot of time.


How to Enable Consent Overview
  1. Select the Admin tab from the top navigation
  2. Click Container Settings
  3. Select Enable Consent Overview
  4. Save your settings

With Consent Overview enabled, you can return to Workspace→Tags. Along the top of the Tags menu, you should now see a shield icon. Click this shield icon to access Consent Overview.


Step 3: Link the "Consent Changed" Event to your Tags

We've added additional guidance on which tags require the Consent Changed trigger. See our latest article on knowledge.truevault.com.

  1. In the left navigation bar, select Tags
  2. Open up "Consent Overview" by clicking on the Shield Icon
  3. Under the "Consent Configured" check the box next to the desired tags by clicking the Checkmark to the left of "Tag Name"
  4. Click the Three Dots "..." in the upper right of the "Consent Configured" window
  5. Select Edit Triggers
  6. To the right of "Firing Triggers" click the Plus (+) icon
  7. A "Choose Trigger" pop up opens from the right, select the "Consent Changed" trigger by Clicking on it.
  8. In the upper right click Save
  9. You will be prompted "Are you sure you want to apply these changes to # selected tags?", confirm by clicking Save
  10. Close the "Consent Overview" window by clicking the X icon in the upper left
  11. You are now ready to go live on your site, you'll need to publish the container. To do so, click Submit in the top-right corner, then Publish

Step 4: Test Your GTM Integration

Still need help? Contact Us Contact Us