Steps to implement TrustCommander with Google Tag Manager.
TrustCommander provides a plug-in to integrate with Google Tag Manager. The setup requires technical installation steps.
This method to integrate GTM is outdated. See the page “Consent Mode in GTM” for a smoother integration.
Following you will find the required steps to implement a standard TrustCommander setup.
Choose the default account configuration mode for your account (see Options).
Setup your TrustCommander categories & vendors (see Manage Categories).
Create one or multiple banner templates (see Manage Banner)
Deploy your TrustCommander banner templates to the Commanders Act CDN or on premise target (see Deploy Banner).
Install TrustCommander tag (see below)
Manage GTM tags with TrustCommander (see below).
To install TrustCommander with Google Tag Manager you need to add following JavaScript tag to your website. This snippet can be added in the <head>
of the website or via a custom HTML tag in Google Tag Manager.
tCPrivacyTagManager
hast to be set to "gtm"
. This variable allows TrustCommander to send privacy settings to GTM. It will push a tcConsentChanged
event to the GTM data layer that includes the privacy settings of a visitor in the tcCategoriesConsent
variable. The event is pushed as soon as TrustCommander loads on a page and in case a visitor updates his privacy settings.
{{ privacy_tag_url }}
has to be replaced with your privacy JavaScript tag URL. This URL can be found in the GENERATE & DEPLOY
tab of each privacy banner.
Field
Value
Variable name
Label that the consent variable has in the GTM interface (recommended: tcCategoriesConsent)
Variable Type
Data Layer Variable
Data Layer Variable Name
tcCategoriesConsent
Data Layer version
Choose the latest data layer version available
Create a new Trigger
for each TrustCommander category and sub-category. These trigger can then be used to only fire your tags when a visitor accepts a certain TrustCommander category. Create each trigger with following settings:
Field
Value
Trigger name
Label of the Trigger in the GTM interface (recommended to use TrustCommander category name like "Retargeting category").
Trigger Type
Custom Event
Event name
tcConsentChanged
This trigger fires on
Some Custom Events
Fire this trigger when an Event occurs and all of these conditions are true
tcCategoriesConsent contains
ID of the related TrustCommander category.
Visitors will be able to activate or deactivate only sub-categories and not the main category in the banner. In case a category has sub-categories then you have to use the sub-category ID instead of the category ID to play out tags.
There are 4 steps to add triggers to tags in Google Tag Manager (GTM).
In the GTM interface, "Variables" tab, create a custom variable to calculate the status of the consent given by the user: no consent, optout, optin or partially optin. Create a "User Defined" variable.
Variable name: tcCategoriesConsent (the name that will appear in your interface, so you can choose another name)
Variable Type: "Data Layer Variable"
Data Layer Variable Name: tcCategoriesConsent (the variable used by Commanders Act Privacy when you add tCPrivacyTagManager = "gtm" in the website’s source code)
Data Layer version: choose the latest data layer version available
Important: to facilitate the implementation of Privacy rules on your tags that may already have other triggers in place, we recommend that you work with an "exception" logic and follow the implementation process explained below. The logic is to create rules that will not trigger the tag if the category is denied rather than rules that will trigger it if the category is valid.
Configure the trigger as follows:
Trigger name: Retargeting category (this name depends on the category names that you create and the name that you want to be displayed on your interface)
Trigger Type: "Custom Event"
Event name: tcConsentChanged (this is the event sent by the Commanders Act Privacy when you use tCPrivacyTagManager = "gtm" in your website’s source code)
This trigger fires on: "Some Custom Events"
Fire this trigger when an Event occurs and all of these conditions are true: pick the tcCategoriesConsent variable created in the previous step, the operator “equals” (or “contains”), and the name of the category as you declared it in the Commanders Act Privacy interface.
Be careful when you create sub-categories associated to a category: you have to enter the sub-category ID and not the category ID in the Trust commander values
, as the user will be able to activate or deactivate only sub-categories and not the main category in the banner:
Be careful in case you use more then 9 categories and sub-categories. In this case there can be a confusion between e.g. category "2" and category "12" as "2" is included in "12". In this case we recommend to only use category IDs above 10. We are working on an improvement to resolve this.
Name of the trigger: "trust_commander".
Trigger Type: "Custom Event"
Event name: "trust_commander"
This trigger fires on: "All Custom Events"
In the "Triggers" section, start by creating the following trigger that allows you to not activate the tags if the user has not yet given his consent :
If you want your site to be in "default optout" mode (blocking of tags when the visitor arrives on your site, in accordance with the General Data Protection Regulations, the GDPR), you must also make the following configuration.
Then create a custom tag that you will trigger on all pages (this is the TrustCommander event listener) in the "Tags" section:
Name of the tag: "Trust commander event listener"
Trigger Type: "Custom HTML"
HTML: copy and paste the following code :
Triggering : "All pages"
In the GTM interface, in the Tags
section, assign the previously created trigger to your tags to fire them based on the TrustCommander categories. These triggers will replace your normal "pageview" trigger.
Steps to implement TrustCommander with Adobe Launch.
TrustCommander provides a plug-in to integrate with Adobe Launch. The setup requires technical installation steps.
Following you will find the required steps to implement a standard TrustCommander setup.
Choose the default account configuration mode for your account (see Options).
Setup your TrustCommander categories & vendors (see Manage Categories).
Create one or multiple banner templates (see Manage Banner)
Deploy your TrustCommander banner templates to the Commanders Act CDN or on premise target (see Deploy Banner).
Implement TrustCommander tag (see below)
Manage Adobe Launch tags with TrustCommander (see below).
TrustCommander creates the consent variables when the privacy javascript file is loaded. You have to delay your Adobe container until TrustCommander is ready otherwise the variables containing the consent status will be undefined.
To delay your container, update your <script>
tags loading your Adobe container in order to execute it after TrustCommander is loaded.
is replaced by :
The text/javascript script type has to be replaced by text/tc_privacy. In this way, Adobe is loaded only when TrustCommander is ready Add the TrustCommander javascript file (if possible, call it before Adobe container and after datalayer) :
When TrustCommander is loaded and gets the consent, a variable tcCategoriesConsent is created by TrustCommander in the Adobe datalayer :
This variable contains the ID of the categories accepted by the user and separated by a coma.
You have to declare this variable in Adobe Launch interface, in the Data Elements configuration. From a Property page, open the Data Elements tab, then click Add Data Element, and add "tcCategoriesConsent" variable.
If your datalayer is not set in the digitalData object, set the path to tcCategoriesConsent (in this case the variable is created in the window scope: window.tcCategoriesConsent)
Then, you have to create the rules that will fire your tags based on the categories ID accepted by the users. You have to create a separate rule for each category you want to use as a firing condition (ex: "Retargeting category accepted", "Analytics category accepted"...).
In the Adobe Launch interface, open the "Rules" tab and click Create New Rule.
Set a rule based on the previously created tcCategoriesConsent. Ex: if you want to trigger a tag based on the Retargeting category (ID 6), you will have to create a rule "if tcCategoriesConsent contains 6", then the Criteo tag has to be triggered.
Steps to implement TrustCommander with TagCommander
TrustCommander and TagCommander are natively integrated with each other. This setup requires minimal technical knowledge and can be done entirely in the interface.
Following you will find the required steps to implement a standard TrustCommander setup.
Choose the default account configuration mode for your account (see Options).
Setup your TrustCommander categories & vendors (see Manage Categories).
Assign your TrustCommander categories & vendors to your TagCommander tags (see Assign Categories)
Create one or multiple banner templates (see Manage Banner)
Deploy your TrustCommander banner templates to the Commanders Act CDN or on premise target (see Deploy Banner).
Connect your privacy banner templates with TagCommander container and implement rules for which the banner should be played out (see below).
To deploy a TrustCommander banner with TagCommander it needs to be linked to a container. TagCommander can then be use to implement detailed rules for which a TrustCommander banner is shown to visitors.
TAG > Tag Management > Edition (tab RULES)
In TagCommander it is possible to provide exact conditions to decide when each of the linked privacy banners should be shown to visitors. Typical use cases consist of:
Implement different banner for different languages or regions
Avoid to deploy the banner on legal pages (privacy policy) so that users can read them before providing consent.
Implement AB test for two banner designs.
You can create constrains under the PRIVACY BANNERS
section to define under which conditions a privacy banner should be shown. Privacy banner constraint work the same way as tag constraints. Please reference constraints in the TagCommander documentation for more information.
You have to first deploy a banner to the Commanders Act CDN or on premise location before being able to configure constraints (see Deploy Banner).
TAG > Tag Management > Edition (tab GENERATE)
TagCommander makes it easy to implement TustCommander banner on websites. To link a privacy banner with a TagCommander container it just has to be activated in the GENERATE
tab with the ACTIVATION
checkbox. This installs the selected privacy banner in the generated container version.
You have to first deploy a banner to the Commanders Act CDN or on premise location before boing able to link it (see Deploy Banner).
All containers of your website should be re-generated and deployed when installing a new privacy banner.
Steps to configure the "Consent Mode" in TagCommander.
Commanders Act provides a tag template to manage the "Consent Mode" in TagCommander. This seamless integration takes advantage of our TrustCommander OnSite API.
Summarizing all recommended steps:
Access your Commanders Act account.
Add our tag template.
Configure your tag and rules.
Configure your third-party vendor tags in GTM.
Test and deploy your container(s).
From the "INTEGRATIONS" side menu, expand(1)
"Sources" and select (2)
"Web containers".
Select a "Web" container and, from the step (3)
"SELECT" (or "EDIT"), click on (4)
"Add Tag(s)".
Search for the tag "gtag - Google Consent Mode with TRUST (BETA)" to add it and proceed with its configuration.
You can now configure your tag and check the (5)
"Tag Implementation guide" for more details.
See (6)
each field for detailed information on how you can map these fields with your datalayer.
Under "RULES", select (7)
"Do Not Include In Privacy Scope" as privacy category or select a category that is always ON.
If your website adopts virtual pages, you need to add a trigger for when these pages are loaded. This can be done under the top section "TRIGGER(S)".
You can skip the following steps, completing your configuration, if you don't have any third-party vendor tags hosted in GTM.
To ensure that the consent is correctly managed by GTM with third-party vendor tags, we strongly recommend to enable reactive events by configuring the related fields.
While Google native product tags, such as "Google Analytics" or "Google Ads" ones, work out of the box, third-party vendor tags, hosted in GTM, require additional settings to properly operate with the user consent. First, open your tag configuration and check under the (8)
"Advanced Settings" → (9)
"Consent Settings" if a consent type (E.g. "ad_storage") is already preconfigured: if not, you need to add it by selecting the option (10)
"Require additional consent for tag to fire" and (11)
input the consent type(s) you want to include.
Then, you need to configure its triggers and this is where we're going to use our reactive events we prepared in the previous section (#configure-your-tag-and-rules). Locate the "Triggering" area in your tag configuration and add a Trigger Group.
In the trigger group add (12)
any preexisting triggers and (13)
a trigger named as your configured reactive event.
The latter has to be configured as a (14)
"Custom Event" with the same (15)
"Event Name" you used in the previous section (#configure-your-tag-and-rules) and it has to fire on (16)
"All Custom Events".
This completes your configuration. You can now start the testing phase, leading to the final deployment in production. Learn more on how you can configure and run tests with your tags in GTM by checking the section "Consent configuration" in the "Help Center".
Steps to configure the "Consent Mode" in Google Tag Manager.
Commanders Act provides a tag template to manage the "Consent Mode" in Google Tag Manager. This seamless integration takes advantage of our TrustCommander OnSite API.
Summarizing all recommended steps:
Access GTM.
Select your "Web" type container.
Add our tag template from the "Community Template Gallery".
Configure the related tag and its trigger.
Configure your third-party vendor tags.
Test and deploy your container.
Following the above steps, adding our template "Commanders Act | OnSite CMP API" from the Google "Community Template Gallery", you're presented with the following "Tag Configuration" which is the core area where you can manage your consent needs with GTM:
First, you need to input your TrustCommander category identifiers for the following 5 categories: "Ad Storage", "Analytics Storage", "Functionality Storage", "Personalization Storage", and "Security Storage". You can find these ids by logging in to our platform and follow the section:
(1)
"TRUST" → (2)
"Categories and Tags" from the navigation sidebar.
Your ids are shown between round parentheses (see highlighted in green below):
If you have sub-categories with the same scope of the five defined by Google, you need to use their ids instead of the main category ones. You can also rename your categories or change their ids by checking the subsection "Managing categories".
If TrustCommander loads asynchronously in your implementation, it might not always run before your GTM container. That’s why you have the option to set a "Wait for update" value in milliseconds to control how long to wait before data is sent. This field is optional and its default value is 0. In case you need to set it, we recommend starting from the base value of 500 milliseconds.
You also need to set the default status, for each of the 5 categories, before users interact with your TrustCommander privacy banner and taking into account region-specific behavior. This is done by clicking the "Add Row" button and selecting either "Denied" or "Granted" to match with your input regions and/or sub-regions.
Ensure that your default command accounts for regional variations in your consent strategy. For more information on customizing the default command, you can see Google’s documentation here.
To make sure that the consent is correctly managed by GTM with third-party vendor tags, we strongly recommend to enable reactive events. Turn on the (3)
"Advanced Features", (4)
"Activate Reactive Events" and (5)
"Activate [Storage-Name] Reactive Event" for each [Storage Name] you're using. Finally, enter their (6)
"Event Name". These events will be used in the next section when configuring your third-party vendor tags.
You also have the option to directly inject your Trust CMP script by turning on the (7)
"Advanced Features", (8)
"Inject CMP Script" and input your (9)
"URL".
Disabling the default consent may come handy when you don't want to use the Consent Mode.
This is done by turning on the (10)
"Advanced Features" and (11)
"Disable Default Consent".
As the last step, you need to select the "Consent Initialization - All Pages" trigger in the "Triggering" lower area:
While Google native product tags, such as "Google Analytics" or "Google Ads" ones, work out of the box, third-party vendor tags require additional settings to properly operate with the user consent. First, open your tag configuration and check under the (12)
"Advanced Settings" and (13)
"Consent Settings" if a consent type (E.g. "ad_storage") is already preconfigured, if not you need to add it by selecting the option (14)
"Require additional consent for tag to fire" and (15)
input the consent type(s) you want to include.
Then, you need to configure its triggers and this is where we're going to use our reactive events we prepared in the previous section. Locate the "Triggering" area in your tag configuration and add a "Trigger Group".
In the trigger group add (16)
any preexisting triggers and (17)
a trigger named as your configured reactive event.
The latter has to be configured as a (18)
"Custom Event" with the same (19)
"Event Name" you used in the previous section and it has to fire on (20)
"All Custom Events".
This completes your configuration. You can now start the testing phase, leading to the final deployment in production. Learn more on how you can configure and run tests with your tags in GTM by checking the section "Consent configuration" in the "Help Center".