isGrantedAdUserData β GTM Variable Template for GTM
isGrantedAdUserData EXTENDED GTM
Returns true if the consent type ad_user_data is granted.
GTM Configuration
Section titled βGTM ConfigurationβThis is what you'll see when you open this variable in Google Tag Manager.
Read-only Preview
isGrantedAdUserData
This function takes no parameters.
Related Variables
Section titled βRelated VariablesβSame category: GTM
Under the Hood
Section titled βUnder the Hoodβπ View Implementation Code
/** * Checks if consent is granted for ad user data. * * @returns {boolean} True if ad user data consent is granted, false otherwise. * * @framework ggLowCodeGTMKit */const isConsentGranted = require('isConsentGranted');
return isConsentGranted('ad_user_data');
___WEB_PERMISSIONS___
[ { "instance": { "key": { "publicId": "access_consent", "versionId": "1" }, "param": [ { "key": "consentTypes", "value": { "type": 2, "listItem": [ { "type": 3, "mapKey": [ { "type": 1, "string": "consentType" }, { "type": 1, "string": "read" }, { "type": 1, "string": "write" } ], "mapValue": [ { "type": 1, "string": "ad_user_data" }, { "type": 8, "boolean": true }, { "type": 8, "boolean": false } ] } ] } } ] }, "clientAnnotations": { "isEditedByUser": true }, "isRequired": true }]