Cookie Consent
Banner Setup and Modes
TrueVault supports multiple consent banner variants. Choose the mode that suits your organization's needs.
The Cookie Consent and GTM consent categorization setup in this guide is essential for all banner variants to work correctly, because it determines which tags are allowed to run based on the consumer's consent preferences. This includes the "Informational banner" variant (and "no banner"), both of which still enforce a user's opt-out preference using our custom GTM consent category. See US & Canada Opt Outs.
- Informational banner: Shows a customizable notice and dismissal controls, but does not prompt for consent preferences.
- "Opt-Out" banner (has consent by default): Consent starts as allowed by default and users can change preferences (for example, via Reject All or Manage buttons).
- "Opt-In" banner (no consent by default): Consent starts as denied by default until the user explicitly grants it (for example, via Accept All or Manage buttons). This is the most restrictive mode.
These banner variants can be configured on a per-state basis to match your regional needs.
Note: If a user clicks Decline All, cookies that were already set by 3rd parties are not automatically removed. Browser security restrictions prevent any CMP from reliably deleting cookies set by other domains (for example, 3rd-party scripts or pixels).
Generally, after a decline, these cookies are considered "inert," as the actual script or pixel that could read them should now be blocked based on the setup in this guide. If residual cookies are a concern for your organization, use the more restrictive Opt-In banner mode so consent-gated scripts do not run until consent is granted (thereby preventing their cookies from being set until consent is given).
1. Categorize Your Tags
Option 1: Edit Tags One at a Time
Now you can assign a consent category to each tag your site uses. If you want to make changes to multiple tags at once, go to Option 2, below.
- In the Workspace tab of Google Tag Manager, select Tags from the left navigation bar
- Click on the tag you want to configure
- Click Tag Configuration
- Open Advanced Settings -> Consent Settings
- Select Require additional consent for tag to fire, then Add required consent
- Choose the appropriate consent category for each tag (e.g., "ad_storage" for advertising tags, "analytics_storage" for analytics tags, etc.). Refer to your organization's categorized list of cookies, which can be found under the Cookie Consent tab in Developer Instructions.
- For Advertising or Marketing tags, set them to require the following consent signal:
ad_storage
- For Analytics tags, require:
analytics_storage
- For Personalization tags, require:
personalization_storage
- For tags to block for opted-out visitors, require:
tv_not_opted_out- (See this article for more information)
- For any other tags that do not require consent, you can leave them as-is or require
functionality_storageorsecurity_storage
- For Advertising or Marketing tags, set them to require the following consent signal:
- Click Save
- Once you've finished with all your tags and are ready for them 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
Note: Some Google products, such as Google Ads, already have built-in consent settings. In these cases, you will not need to manually categorize the tag.
Option 2: Make Bulk Edits with 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
- Select the Admin tab from the top navigation
- Click Container Settings
- Select Enable Consent Overview
- 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.
How to Make Bulk Edits to Consent Settings
- In the list of tags, check the box to the left of each tag you would like to edit
- When one or more boxes are checked the Edit Consent Settings icon (a shield with a cog) will appear; click this icon
- Under Additional consent settings, select the appropriate consent category. Refer to your organization's categorized list of cookies, which can be found under the Cookie Consent tab in Developer Instructions
- Click Save
- Once you've finished with all your tags and are ready for them 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
2. Add "Consent Changed" Event
The "Consent Changed" event allows scripts managed by Google Tag Manager to immediately react to changes in the user's consent when they make a selection in the Consent Manager Widget.
Prerequisites
Before setting up the "Consent Changed" event be sure to complete the following:
- In Polaris check the Publish Notices page and confirm that item #2 "Add Polaris Client-Side JavaScript to your website" is setup correctly.
- Complete the guide, Setup TrueVault CMP Template
Setup
Step 1: Create the "Consent Changed" Event
- Open up Google Tag Manager and open up the websites workspace you are configuring
- In the left navigation bar, select Triggers
- In the Triggers window, click New
- A window will pop up from the right side, name the trigger "Consent Changed" by clicking on the text "Untitled Trigger" and modifying it.
- Hover over Trigger Configuration and click the edit button which appears in the upper right corner.
- A pop up opens from the right, scroll down to "Other" and select Custom Event
- Under "Event Name" enter
consentChoice - Leave the setting "This trigger fires on" set to All Custom Events
- 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
- Select the Admin tab from the top navigation
- Click Container Settings
- Select Enable Consent Overview
- 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
- In the left navigation bar, select Tags
- Open up "Consent Overview" by clicking on the Shield Icon
- Under the "Consent Configured" check the box next to the appropriate tags by clicking the Checkmark to the left of "Tag Name."
See the following section, What Tags Require the Consent Changed Trigger?, to determine which tags should be given the Consent Changed event
- Click the Three Dots "..." in the upper right of the "Consent Configured" window
- Select Edit Triggers
- To the right of "Firing Triggers" click the Plus (+) icon
- A "Choose Trigger" pop up opens from the right, select the "Consent Changed" trigger by Clicking on it.
- In the upper right click Save
- You will be prompted "Are you sure you want to apply these changes to # selected tags?", confirm by clicking Save
- Close the "Consent Overview" window by clicking the X icon in the upper left
- 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
What Tags Require the Consent Changed Trigger?
The Consent Changed trigger is intended to enable you to selectively introduce or exclude page-level content as soon as a user changes their consent preferences. It is not intended to be added to tags that react to in-page events, like measurement of a scroll position or performance of a checkout step.
For tags that measure consumer actions, you should only use the built-in Google Tag Manager "Additional Consent Checks" feature to control whether the tag is allowed to run (based on a consumer having provided the corresponding consent).
Examples
| Add Consent Changed | Do not add Consent Changed |
Pixels and generic page-level scripts:
Generally, any tag that loads "by default" on the page should have the Consent Changed event listed as a trigger to ensure that GTM can dynamically add or remove the tag when a consumer updates their consent. | A tag that runs in response to a specific consumer action (i.e., tags that don't run immediately when the page loads, but rather in response to a certain event):
GTM evaluates consent whenever a tag is triggered, so since these "event-like" tags are already being triggered by some on-page action (causing their required consent to be checked), you don't need to add Consent Changed as an additional trigger to affect whether the script loads. |
In either case, you'll need to specify the consent categories required for a tag. Use Google Tag Manager's built-in "Additional Consent Checks" to do this. Some tags, like Google Analytics, will already have standard categories set up that you won't need to modify - they will appear as "Built-In Consent Checks":
Other 3rd party tags will require you to categorize them and determine the appropriate consent category to add as an "additional consent for tag to fire." This is an important step to ensure tags are running only for consumers that have consented to a particular consent category.
For more detail on the "Additional Consent Checks" pattern, reference our article on Categorize Your Tags and review the sections regarding "Consent Category".