Instantly share code, notes, and snippets.
Last active
January 31, 2020 21:08
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save ju1/99e598c15f656371ae7c5e309dd08d1a to your computer and use it in GitHub Desktop.
CookieBot GDPR recipe for GTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"exportFormatVersion": 2, | |
"exportTime": "2020-01-31 21:08:03", | |
"containerVersion": { | |
"path": "accounts/471432256/containers/9242444/versions/0", | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"containerVersionId": "0", | |
"container": { | |
"path": "accounts/471432256/containers/9242444", | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"name": "Demo 1", | |
"publicId": "GTM-NMWWLSG", | |
"usageContext": [ | |
"WEB" | |
], | |
"fingerprint": "1580504492268", | |
"tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/471432256/containers/9242444/workspaces?apiLink=container" | |
}, | |
"tag": [ | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"tagId": "80", | |
"name": "cHTML - Cookie Bot", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script id=\"Cookiebot\" src=\"https://consent.cookiebot.com/uc.js?cbid={{REPLACE THIS WITH YOUR COOKIE BOT ID}}\" type=\"text/javascript\"></script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1580504865742", | |
"firingTriggerId": [ | |
"2147479553" | |
], | |
"parentFolderId": "108", | |
"tagFiringOption": "ONCE_PER_EVENT", | |
"monitoringMetadata": { | |
"type": "MAP" | |
} | |
} | |
], | |
"trigger": [ | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"triggerId": "109", | |
"name": "Blocking - Marketing Cookies Are Not Allowed", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "MATCH_REGEX", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": ".*" | |
} | |
] | |
} | |
], | |
"filter": [ | |
{ | |
"type": "CONTAINS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{Regex - Marketing Cookies Allowed}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "false" | |
} | |
] | |
} | |
], | |
"fingerprint": "1580504492260", | |
"parentFolderId": "108" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"triggerId": "110", | |
"name": "Blocking - Preference Cookies Are Not Allowed", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "MATCH_REGEX", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": ".*" | |
} | |
] | |
} | |
], | |
"filter": [ | |
{ | |
"type": "CONTAINS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{Regex - Preferences Cookies Allowed}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "false" | |
} | |
] | |
} | |
], | |
"fingerprint": "1580504492261", | |
"parentFolderId": "108" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"triggerId": "111", | |
"name": "Blocking - Statistics Cookies Are Not Allowed", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "MATCH_REGEX", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": ".*" | |
} | |
] | |
} | |
], | |
"filter": [ | |
{ | |
"type": "CONTAINS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{Regex - Statistics Cookies Allowed}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "false" | |
} | |
] | |
} | |
], | |
"fingerprint": "1580504492262", | |
"parentFolderId": "108" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"triggerId": "112", | |
"name": "Custom - Visitor Gave a Consent for Marketing Cookies", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "cookie_consent_marketing" | |
} | |
] | |
} | |
], | |
"fingerprint": "1580504492262", | |
"parentFolderId": "108" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"triggerId": "113", | |
"name": "Custom - Visitor Gave a Consent for Preferences Cookies", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "cookie_consent_preferences" | |
} | |
] | |
} | |
], | |
"fingerprint": "1580504492263", | |
"parentFolderId": "108" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"triggerId": "114", | |
"name": "Custom - Visitor Gave a Consent for Statistics Cookies", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "cookie_consent_statistics" | |
} | |
] | |
} | |
], | |
"fingerprint": "1580504492263", | |
"parentFolderId": "108" | |
} | |
], | |
"variable": [ | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"variableId": "128", | |
"name": "Cookie - CookieConsent", | |
"type": "k", | |
"parameter": [ | |
{ | |
"type": "BOOLEAN", | |
"key": "decodeCookie", | |
"value": "true" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "name", | |
"value": "CookieConsent" | |
} | |
], | |
"fingerprint": "1580504492259", | |
"parentFolderId": "108" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"variableId": "129", | |
"name": "Regex - Marketing Cookies Allowed", | |
"type": "remm", | |
"parameter": [ | |
{ | |
"type": "BOOLEAN", | |
"key": "setDefaultValue", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "input", | |
"value": "{{Cookie - CookieConsent}}" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "fullMatch", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "replaceAfterMatch", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "ignoreCase", | |
"value": "true" | |
}, | |
{ | |
"type": "LIST", | |
"key": "map", | |
"list": [ | |
{ | |
"type": "MAP", | |
"map": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "key", | |
"value": "marketing:true" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "true" | |
} | |
] | |
}, | |
{ | |
"type": "MAP", | |
"map": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "key", | |
"value": ".*" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "false" | |
} | |
] | |
} | |
] | |
} | |
], | |
"fingerprint": "1580504492260", | |
"parentFolderId": "108" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"variableId": "130", | |
"name": "Regex - Preferences Cookies Allowed", | |
"type": "remm", | |
"parameter": [ | |
{ | |
"type": "BOOLEAN", | |
"key": "setDefaultValue", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "input", | |
"value": "{{Cookie - CookieConsent}}" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "fullMatch", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "replaceAfterMatch", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "ignoreCase", | |
"value": "true" | |
}, | |
{ | |
"type": "LIST", | |
"key": "map", | |
"list": [ | |
{ | |
"type": "MAP", | |
"map": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "key", | |
"value": "preferences:true" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "true" | |
} | |
] | |
}, | |
{ | |
"type": "MAP", | |
"map": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "key", | |
"value": ".*" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "false" | |
} | |
] | |
} | |
] | |
} | |
], | |
"fingerprint": "1580504492261", | |
"parentFolderId": "108" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"variableId": "131", | |
"name": "Regex - Statistics Cookies Allowed", | |
"type": "remm", | |
"parameter": [ | |
{ | |
"type": "BOOLEAN", | |
"key": "setDefaultValue", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "input", | |
"value": "{{Cookie - CookieConsent}}" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "fullMatch", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "replaceAfterMatch", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "ignoreCase", | |
"value": "true" | |
}, | |
{ | |
"type": "LIST", | |
"key": "map", | |
"list": [ | |
{ | |
"type": "MAP", | |
"map": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "key", | |
"value": "statistics:true" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "true" | |
} | |
] | |
}, | |
{ | |
"type": "MAP", | |
"map": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "key", | |
"value": ".*" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "false" | |
} | |
] | |
} | |
] | |
} | |
], | |
"fingerprint": "1580504492262", | |
"parentFolderId": "108" | |
} | |
], | |
"folder": [ | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"folderId": "108", | |
"name": "GDPR Cookie Consent", | |
"fingerprint": "1580504492258" | |
} | |
], | |
"builtInVariable": [ | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"type": "PAGE_URL", | |
"name": "Page URL" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"type": "PAGE_HOSTNAME", | |
"name": "Page Hostname" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"type": "PAGE_PATH", | |
"name": "Page Path" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"type": "REFERRER", | |
"name": "Referrer" | |
}, | |
{ | |
"accountId": "471432256", | |
"containerId": "9242444", | |
"type": "EVENT", | |
"name": "Event" | |
} | |
], | |
"fingerprint": "0", | |
"tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/471432256/containers/9242444/versions/0?apiLink=version" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment