Google Consent Mode
Our integration with Google Consent Mode is enabled by default. We provide a mapping of our tracking purposes (Functional, Analytics and 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.
There are a few different ways to load our Consent Manager, but the following are the most straightforward options:
- (Recommended) Manually load
airgap.jsalongsidegtag.js - Load
airgap.jsvia GTM Template
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.
Important: When manually loading both gtag.js and airgap.js, you need to set safe consent defaults before airgap.js loads to prevent "Read before default" errors. This happens because GTM triggers tags asynchronously, and Google Analytics tags may check for consent state before the Transcend script finishes loading.
Your HTML should look something like this:
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Set Developer ID
gtag('set', 'developer_id.dODQ2Mj', true);
// Set immediate defaults so Google tags don't error if they try to read consent state before airgap has finished loading
gtag('consent', 'default', {
analytics_storage: 'denied',
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
functionality_storage: 'denied',
personalization_storage: 'denied',
security_storage: 'denied'
};);
</script>
<script
data-cfasync="false"
src="https://transcend-cdn.com/cm/YOUR_BUNDLE_ID/airgap.js"
onload="window.dataLayer.push({'event': 'transcend_consent_ready'})"
></script>
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:
1. In the Info tab, enter Transcend Consent for the Name and Loads 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 to BUNDLE_ID.

3. Select the Code tab, and copy the following code snippet. This updated template ensures that GTM waits for the Transcend script to fully load before proceeding, and pushes a custom event (transcend_consent_ready) when consent is ready. This allows you to configure other GTM tags to wait for this event before firing, preventing "Read before default" errors.
const injectScript = require('injectScript');
const callInWindow = require('callInWindow');
const copyFromWindow = require('copyFromWindow');
const setInWindow = require('setInWindow');
if (data.BUNDLE_ID) {
let airgap = copyFromWindow('airgap');
const onTranscendReady = function() {
// 1. Release GTM to move to the next trigger
data.gtmOnSuccess();
// 2. Push a custom event to the real dataLayer
callInWindow('dataLayer.push', {
'event': 'transcend_consent_ready'
});
};
if (airgap && airgap.ready) {
callInWindow('airgap.ready', onTranscendReady);
} else {
const stub = {
readyQueue: [onTranscendReady],
ready: function(cb) { this.readyQueue.push(cb); }
};
setInWindow('airgap', stub, true);
}
injectScript('https://transcend-cdn.com/cm/' + data.BUNDLE_ID + '/airgap.js');
// Safety Timeout (3s)
require('callLater')(onTranscendReady, 3000);
} else {
data.gtmOnFailure();
}
4. Click on Permissions, you should see an entry for Inject Scripts. Paste the following into the text input:
https://transcend-cdn.com/cm/*/airgap.js
- Save the template!
- Trigger the tag on the
Consent Initialization - All Pagestrigger, and make sure to specify your bundle ID, which you can find in the Developer Settings page.

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 user grants consent to data collection, 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!
Our default consent mapping with Google Consent Mode is as follows:
Analytics→analytics_storageAdvertising→ {ad_storage,ad_user_data,ad_personalization}Functional→ {functionality_storage,personalization_storage,security_storage}SaleOfInfo→ads_data_redaction(i.e. data is redacted whenSaleOfInfois unconsented)
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 follow 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"
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.
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.
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!