TrueVault Developer Documentation
website·Indexed 39 days ago
https://developers.truevault.comDocumentation for TrueVault's privacy and consent management tools, including the Polaris CMP, cross-platform consent APIs, and automation integrations for Shopify, Stripe, HubSpot, Zendesk, and Klaviyo. Covers setup for Google Tag Manager, DNS configuration for privacy email, and implementation of the IAB Global Privacy Platform (GPP).
What's inside TrueVault
- TrueVault's Consent Management Platform (CMP) implements the IAB Global Privacy Platform (GPP) specification to communicate user privacy signals to downstream vendors and ad-tech partners. The GPP API is available on every page where the TrueVault CMP script is installed, regardless of the banner variant or configuration (including cases where no banner is displayed).
Overview of Polaris Custom API Endpoint Integration
Polaris allows you to send automation requests to your own downstream systems via custom API endpoints. This enables the automatic processing of privacy requests—specifically Lookup, Access, Opt-Out, and Deletion—within your own custom applications and databases. This functionality is a paid add-on and requires activation via a Customer Success representative.Overview of Page Session Consent Events
Page Session Consent Events are one-time-per-page-load browser signals emitted by the CMP in response to specific user consent actions. Unlike the
consentChangedevent, which fires multiple times and carries the full state, these events are designed as signals that fire at most once per page load. They are primarily used for advanced tag-management setups (like Google Tag Manager) where triggers need to react to a specific event name rather than inspecting a payload.Key characteristics:
- Event Target:
window - Event Type:
CustomEvent - Bubbles:
true - Trigger: Only in response to a user action (not automatic state changes or initial page load defaults).
- Frequency: Fires at most once per page load per event name.
- Payload:
event.detailcontains the current consent settings (same shape asconsentChanged), though the event name itself is the primary signal.
- Event Target:
Overview of TrueVault Cross-Platform Consent Management
TrueVault's Consent Management Platform (CMP) allows logged-in consumers to maintain consistent privacy preferences across multiple devices and browsers. The system identifies consumers using platform-specific identifiers (such as Shopify customer IDs or email addresses), generates privacy-preserving JWTs to represent the consumer, and stores preferences in a secure database. When a consumer visits from a new device, the CMP automatically retrieves their stored preferences.Link the 'Consent Changed' trigger to GTM tags
To ensure tags load or unload dynamically when a user updates their consent, link them to the 'Consent Changed' trigger:
- Go to Tags and click the Shield Icon (Consent Overview).
- Select the tags that require the trigger.
- Click the three dots (...) in the upper right and select Edit Triggers.
- Add the Consent Changed trigger to the 'Firing Triggers' list.
- Save and publish the container.
Bulk configure GTM tags using Consent Overview
Consent Overview allows you to apply consent signals to multiple tags simultaneously.
Enable Consent Overview:
- In GTM, go to Admin → Container Settings.
- Select Enable Consent Overview and save.
- Return to Workspace → Tags and click the shield icon.
Apply requirements in bulk:
- Select tags with the same purpose and required signal.
- Click Edit Consent Settings (shield-and-cog icon).
- Under Additional consent settings, add the appropriate signal and save.
Prevent tags from loading for opted-out consumers using GTM
TrueVault provides a GTM integration that controls a consent signal to block scripts and tracking pixels for opted-out consumers. When a consumer opts out via the opt-out workflow, the consent signal is set to 'Denied', preventing any tags requiring that signal from executing.Integrate TrueVault consent banner with Google Tag Manager
TrueVault integrates with Google Tag Manager (GTM) by collecting visitor consent choices and sending corresponding consent signals to GTM. GTM then evaluates these signals against the consent requirements assigned to specific tags before allowing them to fire. For example, analytics tags may require
analytics_storage, advertising tags may requiread_storage, and tags involving the sale or sharing of personal information may require thetv_not_opted_outsignal.Prerequisites:
- Complete the site-wide steps in the TrueVault Getting Started guide.
- Ensure
polaris.jsloads before the GTM container on every page.
Understand TrueVault's Google Consent Mode V2 implementation
TrueVault's GTM template implements Google Consent Mode V2, allowing the Consent Management Platform (CMP) to communicate user consent choices to Google tags (GA4, Google Ads, Floodlight) usinggrantedordeniedsignals. This ensures compliance for users in the EEA, UK, and Switzerland. Key signals includead_user_dataandad_personalization, which are required for Google advertising products in these regions.Understand TrueVault Shopify Consent Request Flow
TrueVault uses Shopify's App Proxy to securely communicate consent preferences. The flow is as follows:
- The CMP JavaScript loads on the Shopify storefront.
- The CMP requests consent data from the store's proxy URL.
- Shopify proxies the request to TrueVault's backend, adding authentication and customer information.
- TrueVault returns existing preferences or creates a new record.
GET https://example-store.myshopify.com/apps/truevault/api/v1/cmp/consent?privacy_center_id=YOUR_TV_PRIVACY_CENTER_ID&provider=shopify&client_id=550e8400-e29b-41d4-a716-446655440000Technical Architecture of the Consent System
The cross-platform consent system is composed of four primary components:
- Consent API: RESTful endpoints used to retrieve and update preferences.
- Provider Authentication: Verification of consumer identity (e.g., via Shopify).
- JWT Generation: Creation of privacy-preserving tokens representing the consumer.
- Storage Layer: Persistence layer with automatic Time-To-Live (TTL) management.
Understand how TrueVault email forwarding works
Email Forwarding allows customers to email your existing privacy address (e.g.,
privacy@yourcompany.com) while TrueVault manages the workflow.The process flow:
- A
privacy@yourcompany.comaddress is established within TrueVault. - TrueVault provides a unique forwarding address in Account Settings > Domain.
- Your email admin creates a rule to forward messages from your public privacy address to the TrueVault forwarding address.
- TrueVault receives messages via its secure inbound service and displays them in the privacy request workflow.
- Your team can reply to requests from the
privacy@yourcompany.comaddress directly within TrueVault.
This method is recommended over the legacy Nylas real-user inbox approach because it does not require a dedicated user mailbox or ongoing mailbox authorization, reducing the risk of intake failure due to expired credentials.
- A