Getting Started with Consent Management
Setting up TrueVault consent management has two parts:
- Add the TrueVault Consent Management Platform (CMP) to every page of your site.
- Connect the CMP to the system that loads your third-party scripts and pixels.
Complete the site-wide setup below first, then follow the integration guide that matches your site.
Add TrueVault to your site
1. Install polaris.js
In the TrueVault app, go to Privacy Center → Publish Notices and open your organization's Developer Instructions. Under Add Polaris Client-Side JavaScript to your website, copy your organization's code block. It will look like this:
<!-- Start of TrueVault Code Block -->
<script src="https://polaris.truevaultcdn.com/static/pc/{YOUR_PRIVACY_CENTER_ID}/polaris.js"></script>
<!-- End of TrueVault Code Block -->
Add the code to the beginning of the <head> element so it loads first on every page. It's important to place it before Google Tag Manager and other scripts that require consent.
Load Polaris synchronously. Do not add defer or async to the polaris.js script. Loading it early allows TrueVault to establish the visitor's consent state before other scripts run.
2. Add your privacy notice links
The Developer Instructions also contain organization-specific HTML for links such as California Privacy Notice, Notice of Financial Incentive, and Your Privacy Choices. Add the links that appear in your instructions to the appropriate locations on your site, typically near your Privacy Policy link in the footer.
The “Your Privacy Choices” link may disappear during testing. Keep the truevault-polaris-optout class on this link. Polaris uses the class to show the link only in jurisdictions where your configuration makes it relevant. If the link is hidden outside those jurisdictions, the integration is working as intended.
Choose how your site manages tags
The CMP records the visitor's choices, but your site must also use those choices to decide when third-party tags can run. Start with the path that describes how those tags are installed on your site.
Google Tag Manager (recommended)
Use this path if you manage analytics, advertising, chat, or other third-party tags in Google Tag Manager. GTM can evaluate consent before loading a tag, which provides the clearest control over when network requests are made. This is also the recommended path for Shopify or BigCommerce sites that load tags through GTM.
Start the Google Tag Manager setup →
Shopify
TrueVault sends consent choices to Shopify's Customer Privacy API. Shopify then applies those choices to App Pixels and Custom Pixels according to each pixel's privacy configuration.
Set up consent for Shopify pixels →
If you also use GTM on your Shopify theme, complete the Google Tag Manager setup for the tags in that container.
BigCommerce
On Stencil storefronts, TrueVault sends consent choices to BigCommerce so it can control scripts managed by the platform.
Set up the BigCommerce integration →
If you also use GTM, complete the Google Tag Manager setup for the tags in that container.
Tags installed directly on your site
If you cannot move a script into GTM or another supported platform, you can add consent requirements directly to its HTML with data-polaris-consent.
Loading scripts directly is not the preferred approach. Unlike a tag manager, this method cannot always prevent the browser from requesting a script before Polaris removes it from the page. That network traffic may be undesirable even if the script does not remain active. When possible, use GTM so consent can be checked before the script loads.
If you are comfortable with this approach and want to keep tags directly on your site, see Manage consent without Google Tag Manager →.