Set Up Consent Management with Google Tag Manager
This guide is the starting point for connecting your TrueVault consent banner to Google Tag Manager (GTM). It explains the order of the setup and links to the detailed instructions for each step.
Before you begin, complete the site-wide steps in Getting Started. In particular, confirm that polaris.js loads before the GTM container on every page.
How the integration works
TrueVault collects the visitor's consent choices and sends the corresponding consent signals to GTM. You then assign consent requirements to the tags in your container. GTM checks those requirements before allowing a tag to fire.
For example, an analytics tag can require analytics_storage, while an advertising tag can require ad_storage. A tag that sells or shares personal information can also require TrueVault's tv_not_opted_out signal.
Complete the GTM setup
Follow these steps in order.
1. Connect TrueVault to GTM
Install the TrueVault Polaris CMP template, create a tag from it, and run that tag on GTM's Consent Initialization - All Pages trigger. This makes the visitor's consent state available before other tags are evaluated.
Install the TrueVault CMP template →
2. Configure the banner and categorize your tags
Choose the banner behavior your organization needs, then review the tags in your GTM container and assign the appropriate consent requirements. Your organization's Developer Instructions can help you match scanned vendors to the Advertising, Analytics, Personalization, and selling or sharing categories.
Configure consent requirements for your tags →
3. Apply US and Canada opt-out requirements
Tags used for selling, sharing, or targeted advertising may also need to require tv_not_opted_out. When a visitor exercises an applicable opt-out right, TrueVault denies this signal and GTM prevents those tags from firing.
Configure US and Canada opt-outs →
4. Respond when a visitor changes consent
Create the consentChoice trigger for page-level tags that should be reevaluated immediately after a visitor changes their preferences. Tags that already fire in response to a later interaction generally do not need this additional trigger.
Add the Consent Changed event →
5. Review vendor-specific behavior
Some products have built-in consent checks or need additional configuration:
Only follow the guides for products and configurations your site uses.
6. Test before publishing
Use GTM Preview to test each consent state and confirm that tags run only when their requirements are satisfied, both before and after publishing your container.
Repeat these checks when you add a vendor, change a tag, or update your consent configuration.