Introduction
Our integration with Google Consent Mode is enabled by default. We provide a mapping of our tracking purposes (Functional, Analytics, Advertising, SaleOfInfo) into Google Consent Mode purposes, and our integration will automatically update Google Consent Mode whenever consent changes.
In addition to our documentation, we also recommend reviewing Google's Consent Mode Quickstart documentation.
Quick Start
Step 1: Load the Consent Manager script
There are a few different ways to load our Consent Manager, but the following are the most straightforward options:
(Option 1) Manual Loading
Copy the airgap.js code snippet from the Developer Settings > Installation page and paste it in the <head> tag section of your site, making sure to place it before any tracker scripts.
The only extra step you'll need to do if you're manually loading both gtag.js and airgap.js is to make sure to include the developer ID using gtag('set', 'developer_id.dODQ2Mj', true).
Your HTML should look something like this:
<script data-cfasync="false" src="https://transcend-cdn.com/cm/3ab8ffa2-bc84-490c-9929-e099b6561bbf/airgap.js" ></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MW89GEZ3BW" ></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "<YOUR_GTM_ID>");
gtag('set', 'developer_id.dODQ2Mj', true);
</script>
(Option 2) Loading via GTM
If you can't easily modify your site code, you can also load airgap.js via a GTM Template. Don't forget to also include the Transcend Google Developer ID in your gtag template: gtag('set', 'developer_id.dODQ2Mj', true).
To load airgap.js via GTM, you should create a new GTM template. This can be done in a few simple steps:
In the Info tab, enter
Transcend Consentfor the Name andLoads the Transcend Consent script to collect & enforce user consent.for the Description. 2. Select the Fields tab, click Add Field > Text Input. Change the name toBUNDLE_ID. 3. Select the Code tab, and copy the following code snippet. All this does is load theairgap.jsscript. Onceairgap.jsis loaded, it will automatically communicate with GCM and set the default consent state, so you do not need to do that here. Default purposes can already be configured via your Regional Experiences page, andairgap.jswill take care of communicating these defaults to GCM. You do not need to write any additional code or set any additional configuration inside GTM. Should you wish to set default consent state prior toairgap.jsloading, because there may be other trackers or tags loaded at the same time/using the same trigger asairgap.js, please refer to this guide.JavaScript
const injectScript = require('injectScript');
if (data.BUNDLE_ID) {
const URL = 'https://transcend-cdn.com/cm/' + data.BUNDLE_ID + '/airgap.js';
injectScript(URL);
data.gtmOnSuccess();
} else {
log('Cannot load Transcend Consent -- missing BUNDLE_ID.');
data.gtmOnFailure();
}Click on Permissions, you should see an entry for
Inject Scripts. Paste the following into the text input:https://transcend-cdn.com/cm/*/airgap.jsSave the template!
Trigger the tag on the Consent Initialization - All Pages trigger, and make sure to specify your bundle ID, which you can find in the Developer Settings page.
Step 2: Confirm Google Data Flows
Google Consent Mode can be configured as Basic or Advanced. For a detailed description of both, please refer to the official Google documentation.
In Basic mode, Google tags are blocked until user consent is given. When consent is denied or not yet given, no data is transferred to Google at all β not even the consent status. Google tags are completely blocked from firing.
In Advanced mode, Google tags load when a user opens the website or app. The tags load the Consent Mode API in order to send default consent states and any subsequent updated consent states. When consent is denied or not yet given, the Google tags will send cookieless pings. Once a user grants consent to data collection, the Google tag will send the full measurement data.
To implement Basic Google Consent Mode, simply tag all data flows associated with Google services with a non-Essential tracking purpose (e.g., Analytics for Google Analytics or Advertising for Google Advertising).
To implement Advanced Google Consent Mode, simply tag all data flows associated with Google services with the Essential purpose.
Once you have finished tagging all the data flows in your Triage tab, don't forget to click Review Changes & Publish... so that those changes can take effect on your site!
Step 3: Review Purpose Mapping
Our default consent mapping with Google Consent Mode is as follows:
Transcend Purpose | Google Consent Mode Parameter | Note |
|
|
|
|
|
|
|
|
|
|
| Data is redacted when |
This mapping can be reconfigured for airgap.js versions 8.33.0 and later.
In order to configure a specific parameter, set that parameter's associated trigger purposes (or force-enable the parameter) through the data-tracker-overrides script attribute. Multiple parameters can be separated using semicolons (e.g., GoogleConsentMode:analytics_storage=SaleOfInfo,Analytics;ad_storage=SaleOfInfo).
The following example sets the trigger purposes for analytics_storage to SaleOfInfo and Analytics:
data-tracker-overrides="GoogleConsentMode:analytics_storage=SaleOfInfo,Analytics VimeoDNT YouTubePrivacyEnhancedMode WistiaDNT FacebookLDU"
In order to force-enable a parameter, set its associated trigger purposes to on. The following example does this for analytics_storage:
data-tracker-overrides="GoogleConsentMode:analytics_storage=on VimeoDNT YouTubePrivacyEnhancedMode WistiaDNT FacebookLDU"
In order to disable Google Consent Mode, you can simply leave it out of the list of data-tracker-overrides, or specify "off" as the value to disable all third-party integrations:
data-tracker-overrides="off"
Step 4: (Optional) Review TCF Integration
If you use both Google Consent Mode and TCF, please see our TCF setup guide. Our TCF implementation integrates with GCM by default. If you wish to disable the TCF integration with GCM, please contact our support team. For more integration on how the TCF integration maps TCF Purposes to Google Consent Mode purposes, please review this documentation.
Step 5: Review the Regional Experiences
Your Transcend Consent instance will have some default user experiences already configured for different regions. These can be found at the Regional Experiences page. Please review these with your business partners (e.g., marketing, legal teams) to make sure that it is appropriate for your business and legal needs.
Step 6: Verify that Consent Mode Works
To confirm that consent mode is set up correctly, please refer to this official guide provided by Google. You will need to install the Tag Assistant plugin.
If you have any questions about this implementation guide, please don't hesitate to contact our Transcend Support team!
