Instantly share code, notes, and snippets.
Last active
November 16, 2019 15:15
-
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 AaronSadlerUK/5a7442f8ce96891bb717c9547aaa5824 to your computer and use it in GitHub Desktop.
See the blog post here: https://aaronsadler.uk/2019/november/16/eu-cookie-consent-with-google-tag-manager/
This file contains 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": "2018-06-25 20:28:22", | |
"containerVersion": { | |
"path": "accounts/3241457577/containers/9092220/versions/0", | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"containerVersionId": "0", | |
"container": { | |
"path": "accounts/3241457577/containers/9092220", | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"name": "www.testsite.com", | |
"publicId": "GTM-M6NMJMX", | |
"usageContext": [ | |
"WEB" | |
], | |
"fingerprint": "1529958470535", | |
"tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/3241457577/containers/9092220/workspaces?apiLink=container" | |
}, | |
"tag": [ | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"tagId": "19", | |
"name": "Cookie Bar", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<style>\n #cookie_bar {\n width: 100%;\n z-index: 999999999;\n position: fixed;\n bottom: 0;\n background: #f5f5f6;\n border-top: 1px solid #d2d2d7;\n padding-top: 7.5px;\n padding-bottom: 7.5px;\n font-size: 14px;\n padding: 5px 2% 10px 2%;\n font-family: sans-serif;\n line-height: 24px;\n box-sizing: border-box;\n }\n\n .policy_link {\n text-decoration: none;\n color: black;\n border-bottom: 3px solid #50505a;\n padding: 0px;\n display: inline-block;\n }\n\n .policy_settings {\n text-decoration: none;\n color: black;\n border-bottom: 3px solid #50505a;\n margin: 0px 18px;\n display: inline-block;\n }\n\n .cookie_close {\n background: #50505a;\n margin: 5px;\n color: white;\n padding: 4px 18px;\n border-radius: 4px;\n cursor: pointer;\n display: inline-block;\n }\n</style>\n\n<script>\n function fadeOut(el) {\n el.style.opacity = 1;\n\n (function fade() {\n if ((el.style.opacity -= .1) < 0) {\n el.style.display = \"none\";\n } else {\n requestAnimationFrame(fade);\n }\n })();\n }\n\n\n var cookie_bar = document.createElement('div');\n cookie_bar.setAttribute('id', 'cookie_bar');\n var container = document.querySelector('body');\n container.append(cookie_bar);\n\n document.getElementById(\"cookie_bar\").innerHTML = {{Cookie Bar Text}};\n\n document.addEventListener('click', function (event) {\n // Make sure clicked element is our cookie_close\n if (!event.target.classList.contains('cookie_close')) return;\n\n var el = document.getElementById('cookie_bar');\n fadeOut(el);\n\n dataLayer.push({\n 'event': 'setCookie',\n 'attributes': {\n 'cookieName': 'cookie_consent_performance',\n 'cookieValue': 1,\n 'cookieDomain': '{{Cookie Base URL}}',\n 'cookiePath': '/',\n 'cookieExpires': 365\n }\n });\n\n dataLayer.push({\n 'event': 'setCookie',\n 'attributes': {\n 'cookieName': 'cookie_consent_targeting',\n 'cookieValue': 1,\n 'cookieDomain': '{{Cookie Base URL}}',\n 'cookiePath': '/',\n 'cookieExpires': 365\n }\n });\n\n dataLayer.push({\n 'event': 'setCookie',\n 'attributes': {\n 'cookieName': 'cookie_consent_settings_set',\n 'cookieValue': 1,\n 'cookieDomain': '{{Cookie Base URL}}',\n 'cookiePath': '/',\n 'cookieExpires': 365\n }\n });\n\n dataLayer.push({\n 'ga_cookie_settings': 'p1t1',\n 'event': 'consent_event',\n 'consent_performance': 1,\n 'consent_targeting': 1\n });\n });\n\n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1529953206586", | |
"firingTriggerId": [ | |
"50" | |
], | |
"parentFolderId": "40", | |
"tagFiringOption": "ONCE_PER_EVENT" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"tagId": "20", | |
"name": "Cookie Remover", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script type=\"text/javascript\" id=\"gtm-cookie-remover\">\n /*\n * Cookie Remover\n * Script for remving cookies within GTM using Custom HTML Tags\n *\n * Instructions:\n * To remove a cookie, create a Custom HTML Tag that pushes data about\n * the cookie into the dataLayer.\n *\n * <script>\n * dataLayer.push({\n * 'event': 'removeCookie',\n * 'attributes': {\n * 'cookieName': 'myCookie', // Required.\n * 'cookiePath': '/', // Opt. Defaults to '/'. Must match stored cookie.\n * 'cookieDomain': 'example.com', // Opt. Defaults to hostname of page. Must match stored cookie.\n * }\n * });\n * <\\/script>\n *\n * If the cookie doesn't appear to be removed, check the path and hostname of the\n * stored cookie, as these values must match in order to successfully remove it.\n */\n (function(document) {\n\n\tvar attributes = {{DLV - attributes - v1}};\n var cookieName = attributes.cookieName; // Name of the cookie; preferred syntax is all lowercase, with no spaces\n var cookieDomain = attributes.cookieDomain; // Hostname cookie is stored on\n var cookiePath = attributes.cookiePath; // Path cookie is stored at.\n \n if(typeof cookieName !== 'undefined') {\n \n document.cookie = cookieName + '=; Expires=Thu, 01 Jan 1970 00:00:01 GMT'\n + (cookieDomain ? '; Domain=' + cookieDomain : '') \n + (cookiePath ? '; Path=' + cookiePath : '');\n \n }\n \n })(document);\n /*\n * v1.0.0\n * Created by the Google Analytics consultants at http://www.lunametrics.com\n * Written by @notdanwilkerson\n * Licensed under the MIT License\n */\n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1527622952129", | |
"firingTriggerId": [ | |
"43" | |
], | |
"parentFolderId": "41", | |
"tagFiringOption": "ONCE_PER_EVENT" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"tagId": "21", | |
"name": "Cookie Setter", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script type=\"text/javascript\" id=\"gtm-cookie-setter\">\n /*\n * Cookie Setter\n * Script for setting cookies within GTM using Custom HTML Tags\n *\n * NOTE: STORED VALUES ARE URI-ENCODED - when retrieving w/ a 1st-party\n * cookie Variable, you MUST check the \"URI-decode\" checkbox.\n *\n * Instructions:\n * To set a cookie, create a Custom HTML Tag that pushes data about\n * the cookie into the dataLayer.\n *\n * <script>\n * dataLayer.push({\n * 'event': 'setCookie',\n * 'attributes': {\n * 'cookieName': 'myCookie', // Required.\n * 'cookieValue': '12345', // Required.\n * 'cookiePath': '/', // Opt. Defaults to '/'.\n * 'cookieDomain': 'example.com', // Opt. Defaults to hostname of page\n * 'cookieExpires': 30 // Opt. Set in days. Default is after browser closes.\n * }\n * });\n * <\\/script>\n *\n * For 99% of uses cases, cookiePath should be '/', and cookieDomain should be\n * 'domainname.tld', e.g. for 'shop.example.com' you would use 'example.com'.\n * If you need the cookie to expire in less than a day, provide a fraction\n * or division for cookieExpires, e.g. a 30 minute expiration would be: 1 / 48\n */\n (function(document) {\n\n var attributes = {{DLV - attributes - v1}};\n var cookieName = attributes.cookieName; // Name of the cookie; preferred syntax is all lowercase, with no spaces\n var cookieValue = encodeURIComponent(attributes.cookieValue); // The value stored with the cookie. Is automatically encoded. Check 'Decode cookie value' when using with 1st Party Cookie Variable\n var cookieExpires = parseFloat(attributes.cookieExpires); // Expiration length in terms of days. Defaults to expiring when the browser closes. Can accept a fraction for > 1 day time periods, e.g. 1/48 (30 minutes)\n var cookieDomain = attributes.cookieDomain; // Hostname to store the cookie on. Defaults to browser handling.\n var cookiePath = attributes.cookiePath || '/'; // Path to store cookie at. Defaults to '/'.\n \n var expirationDate = '';\n\n if(!isNaN(cookieExpires) && cookieExpires !== 0) {\n\n expirationDate = \"; Expires=\" + new Date(+new Date() + 1000 * 60 * 60 * 24 * cookieExpires).toGMTString();\n\n }\n\n if(typeof cookieName !== 'undefined' && typeof cookieValue !== 'undefined') {\n\n document.cookie = cookieName + '=' +\n encodeURIComponent(cookieValue) +\n expirationDate +\n (cookieDomain ? '; Domain=' + cookieDomain : '') +\n (cookiePath ? '; Path=' + cookiePath : '');\n\n }\n \n })(document);\n /*\n * v1.0.1\n * Created by the Google Analytics consultants at http://www.lunametrics.com\n * Written by @notdanwilkerson\n * Licensed under the MIT License\n */\n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1527622952130", | |
"firingTriggerId": [ | |
"44" | |
], | |
"parentFolderId": "41", | |
"tagFiringOption": "ONCE_PER_EVENT" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"tagId": "22", | |
"name": "Cookie Settings", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script>\n\n var cookie_consent_set = {{cookie_consent_settings_set}};\n var cookie_consent_performance = {{cookie_consent_performance}};\n var cookie_consent_targeting = {{cookie_consent_targeting}};\n\n (function () {\n\n /* Cookie Consent Performance */\n if (cookie_consent_set != 1) {\n /* Set Default Variables */\n cookie_consent_performance = {{Cookie Performance Default}};\n cookie_consent_targeting = {{Cookie Targeting Default}};\n /* Set Default Cookie Set */\n dataLayer.push({\n 'event': 'setCookie',\n 'attributes': {\n 'cookieName': 'cookie_consent_performance',\n 'cookieValue': {{Cookie Performance Default}},\n 'cookieDomain': '{{Cookie Base URL}}',\n 'cookiePath': '/',\n 'cookieExpires': 365\n }\n });\n dataLayer.push({\n 'event': 'setCookie',\n 'attributes': {\n 'cookieName': 'cookie_consent_targeting',\n 'cookieValue': {{Cookie Targeting Default}},\n 'cookieDomain': '{{Cookie Base URL}}',\n 'cookiePath': '/',\n 'cookieExpires': 365\n }\n });\n /* Push Default Consent Events */\n dataLayer.push({\n 'ga_cookie_settings': 'p' + cookie_consent_performance + 't' + cookie_consent_targeting,\n 'event': 'consent_event',\n 'consent_performance': {{Cookie Performance Default}},\n 'consent_targeting': {{Cookie Targeting Default}}\n });\n } else {\n dataLayer.push({\n 'ga_cookie_settings': 'p' + cookie_consent_performance + 't' + cookie_consent_targeting,\n 'event': 'consent_event',\n 'consent_performance': cookie_consent_performance,\n 'consent_targeting': cookie_consent_targeting\n });\n }\n })();\n\n\n /* Preset Settings Toggles Accordingly */\n var elConsentPerformance = document.getElementById('consent_performance');\n var elConsentTargeting = document.getElementById('consent_targeting');\n\n if (elConsentPerformance) {\n if (cookie_consent_performance == 1) {\n elConsentPerformance.checked = true;\n } else if (cookie_consent_performance == 0) {\n elConsentPerformance.checked = false;\n }\n }\n\n if (elConsentTargeting) {\n if (cookie_consent_targeting == 1) {\n elConsentTargeting.checked = true;\n } else if (cookie_consent_targeting == 0) {\n elConsentTargeting.checked = false;\n }\n }\n\n\n /* Change State of Settings */\n var elConsentSave = document.getElementById('consent_save');\n if (elConsentSave) {\n elConsentSave.addEventListener(\"click\", function () {\n /* Set Performance */\n\n if (elConsentPerformance.checked) {\n dataLayer.push({\n 'event': 'setCookie',\n 'attributes': {\n 'cookieName': 'cookie_consent_performance',\n 'cookieValue': 1,\n 'cookieDomain': '{{Cookie Base URL}}',\n 'cookiePath': '/',\n 'cookieExpires': 365\n }\n });\n } else {\n dataLayer.push({\n 'event': 'setCookie',\n 'attributes': {\n 'cookieName': 'cookie_consent_performance',\n 'cookieValue': 0,\n 'cookieDomain': '{{Cookie Base URL}}',\n 'cookiePath': '/',\n 'cookieExpires': 365\n }\n });\n }\n\n /* Set Targeting */\n\n if (elConsentTargeting.checked) {\n dataLayer.push({\n 'event': 'setCookie',\n 'attributes': {\n 'cookieName': 'cookie_consent_targeting',\n 'cookieValue': 1,\n 'cookieDomain': '{{Cookie Base URL}}',\n 'cookiePath': '/',\n 'cookieExpires': 365\n }\n });\n } else {\n dataLayer.push({\n 'event': 'setCookie',\n 'attributes': {\n 'cookieName': 'cookie_consent_targeting',\n 'cookieValue': 0,\n 'cookieDomain': '{{Cookie Base URL}}',\n 'cookiePath': '/',\n 'cookieExpires': 365\n }\n });\n }\n\n dataLayer.push({\n 'event': 'setCookie',\n 'attributes': {\n 'cookieName': 'cookie_consent_settings_set',\n 'cookieValue': 1,\n 'cookieDomain': '{{Cookie Base URL}}',\n 'cookiePath': '/',\n 'cookieExpires': 365\n }\n });\n\n window.location.reload(true);\n\n });\n }\n\n dataLayer.push({\n 'event': 'showCookieBar'\n });\n\n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1529958354496", | |
"firingTriggerId": [ | |
"2147479553" | |
], | |
"parentFolderId": "40", | |
"tagFiringOption": "ONCE_PER_EVENT" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"tagId": "23", | |
"name": "Example Performance Pageview Pixel", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script>\n console.log('Performance Pixel Fired');\n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1527799708696", | |
"firingTriggerId": [ | |
"45", | |
"2147479553" | |
], | |
"blockingTriggerId": [ | |
"52", | |
"62" | |
], | |
"parentFolderId": "40", | |
"tagFiringOption": "ONCE_PER_LOAD" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"tagId": "27", | |
"name": "Example Performance Transaction Pixel", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script>\n console.log('Performance Transaction Pixel Fired');\n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1527800665788", | |
"firingTriggerId": [ | |
"46", | |
"64" | |
], | |
"blockingTriggerId": [ | |
"52", | |
"62" | |
], | |
"parentFolderId": "40", | |
"tagFiringOption": "ONCE_PER_LOAD" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"tagId": "24", | |
"name": "Example Targeting Pageview Pixel", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script>\n console.log('Targeting Pixel Fired');\n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1527800053117", | |
"firingTriggerId": [ | |
"45", | |
"2147479553" | |
], | |
"blockingTriggerId": [ | |
"51", | |
"63" | |
], | |
"parentFolderId": "40", | |
"tagFiringOption": "ONCE_PER_LOAD" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"tagId": "28", | |
"name": "Example Targeting Transaction Pixel", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script>\n console.log('Targeting Transaction Pixel Fired');\n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1527800098665", | |
"firingTriggerId": [ | |
"46", | |
"64" | |
], | |
"blockingTriggerId": [ | |
"51", | |
"63" | |
], | |
"parentFolderId": "40", | |
"tagFiringOption": "ONCE_PER_LOAD" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"tagId": "26", | |
"name": "Settings Seen Cookie", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script>\n dataLayer.push({\n \t\t'event': 'setCookie',\n \t\t'attributes': {\n \t'cookieName': 'cookie_consent_settings_set',\n \t'cookieValue': 1,\n \t'cookieDomain': '{{Cookie Base URL}}',\n \t'cookiePath': '/',\n \t'cookieExpires': 365\n \t \t}\n\t\t});\n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1527622952134", | |
"firingTriggerId": [ | |
"42" | |
], | |
"parentFolderId": "40", | |
"tagFiringOption": "ONCE_PER_EVENT" | |
} | |
], | |
"trigger": [ | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "42", | |
"name": "Cookie Settings Pageview", | |
"type": "PAGEVIEW", | |
"filter": [ | |
{ | |
"type": "CONTAINS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{Page Path}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "/cookie-settings" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527622952113", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "43", | |
"name": "Event - Remove Cookie", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "removeCookie" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527622952114", | |
"parentFolderId": "41" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "44", | |
"name": "Event - Set Cookie", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "setCookie" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527622952114", | |
"parentFolderId": "41" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "62", | |
"name": "Performance Cookies Blocked", | |
"type": "PAGEVIEW", | |
"filter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{cookie_consent_performance}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "1" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "negate", | |
"value": "true" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527800837966", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "63", | |
"name": "Targeting Cookies Blocked", | |
"type": "PAGEVIEW", | |
"filter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{cookie_consent_targeting}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "1" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "negate", | |
"value": "true" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527800837967", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "64", | |
"name": "Transaction Page", | |
"type": "PAGEVIEW", | |
"filter": [ | |
{ | |
"type": "CONTAINS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{Page Path}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "/conversion" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527800837967", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "45", | |
"name": "consent_event", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "consent_event" | |
} | |
] | |
} | |
], | |
"filter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{Do Not Track}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "1" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "negate", | |
"value": "true" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527623047530", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "46", | |
"name": "consent_event_transaction", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "consent_event" | |
} | |
] | |
} | |
], | |
"filter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{Do Not Track}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "1" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "negate", | |
"value": "true" | |
} | |
] | |
}, | |
{ | |
"type": "CONTAINS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{Page URL}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "/conversion" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527623791272", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "52", | |
"name": "consent_performance_blocked", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "MATCH_REGEX", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": ".*" | |
} | |
] | |
} | |
], | |
"filter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{cookie_consent_performance}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "0" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527623975153", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "51", | |
"name": "consent_targeting_blocked", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "MATCH_REGEX", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": ".*" | |
} | |
] | |
} | |
], | |
"filter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{cookie_consent_targeting}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "0" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527623975153", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"triggerId": "50", | |
"name": "showCookieBar", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "showCookieBar" | |
} | |
] | |
} | |
], | |
"filter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{cookie_consent_settings_set}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "1" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "negate", | |
"value": "true" | |
} | |
] | |
} | |
], | |
"fingerprint": "1527622952121", | |
"parentFolderId": "40" | |
} | |
], | |
"variable": [ | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"variableId": "31", | |
"name": "Cookie Bar Text", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "This website or its third party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the <a class=\"policy_link\" href=\"http://technicalmarketing.guide/privacy-policy/\">cookie policy</a>. If you want to know more or withdraw your consent to all or some of the cookies, please refer to the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies.<a class=\"policy_settings\" href=\"http://technicalmarketing.guide/cookie-settings/\">cookie settings</a><button type=\"button\" class=\"cookie_close\">Accept Cookies</button>" | |
} | |
], | |
"fingerprint": "1529958397236", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"variableId": "26", | |
"name": "Cookie Base URL", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": ".yourdomain.com" | |
} | |
], | |
"fingerprint": "1527622952123", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"variableId": "32", | |
"name": "Cookie Performance Default", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "1" | |
} | |
], | |
"fingerprint": "1529958397236", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"variableId": "33", | |
"name": "Cookie Targeting Default", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "0" | |
} | |
], | |
"fingerprint": "1529958397237", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"variableId": "27", | |
"name": "DLV - attributes - v1", | |
"type": "v", | |
"parameter": [ | |
{ | |
"type": "INTEGER", | |
"key": "dataLayerVersion", | |
"value": "1" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "setDefaultValue", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "name", | |
"value": "attributes" | |
} | |
], | |
"fingerprint": "1527622952124", | |
"parentFolderId": "41" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"variableId": "22", | |
"name": "Do Not Track", | |
"type": "j", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "name", | |
"value": "navigator.doNotTrack" | |
} | |
], | |
"fingerprint": "1527622952115", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"variableId": "28", | |
"name": "cookie_consent_performance", | |
"type": "k", | |
"parameter": [ | |
{ | |
"type": "BOOLEAN", | |
"key": "decodeCookie", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "name", | |
"value": "cookie_consent_performance" | |
} | |
], | |
"fingerprint": "1527622952124", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"variableId": "25", | |
"name": "cookie_consent_settings_set", | |
"type": "k", | |
"parameter": [ | |
{ | |
"type": "BOOLEAN", | |
"key": "decodeCookie", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "name", | |
"value": "cookie_consent_settings_set" | |
} | |
], | |
"fingerprint": "1527622952121", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"variableId": "29", | |
"name": "cookie_consent_targeting", | |
"type": "k", | |
"parameter": [ | |
{ | |
"type": "BOOLEAN", | |
"key": "decodeCookie", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "name", | |
"value": "cookie_consent_targeting" | |
} | |
], | |
"fingerprint": "1527622952126", | |
"parentFolderId": "40" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"variableId": "30", | |
"name": "ga_cookie_settings", | |
"type": "v", | |
"parameter": [ | |
{ | |
"type": "INTEGER", | |
"key": "dataLayerVersion", | |
"value": "2" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "setDefaultValue", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "name", | |
"value": "ga_cookie_settings" | |
} | |
], | |
"fingerprint": "1527622952126", | |
"parentFolderId": "40" | |
} | |
], | |
"folder": [ | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"folderId": "40", | |
"name": "Cookie Consent", | |
"fingerprint": "1527622952112" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"folderId": "41", | |
"name": "Cookie Management", | |
"fingerprint": "1527622952112" | |
} | |
], | |
"builtInVariable": [ | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "PAGE_URL", | |
"name": "Page URL" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "PAGE_HOSTNAME", | |
"name": "Page Hostname" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "PAGE_PATH", | |
"name": "Page Path" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "REFERRER", | |
"name": "Referrer" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "EVENT", | |
"name": "Event" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "CLICK_ELEMENT", | |
"name": "Click Element" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "CLICK_CLASSES", | |
"name": "Click Classes" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "CLICK_ID", | |
"name": "Click ID" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "CLICK_TARGET", | |
"name": "Click Target" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "CLICK_URL", | |
"name": "Click URL" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "CLICK_TEXT", | |
"name": "Click Text" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "FORM_ELEMENT", | |
"name": "Form Element" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "FORM_CLASSES", | |
"name": "Form Classes" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "FORM_ID", | |
"name": "Form ID" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "FORM_TARGET", | |
"name": "Form Target" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "FORM_URL", | |
"name": "Form URL" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "FORM_TEXT", | |
"name": "Form Text" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "CONTAINER_ID", | |
"name": "Container ID" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "SCROLL_DEPTH_THRESHOLD", | |
"name": "Scroll Depth Threshold" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "SCROLL_DEPTH_UNITS", | |
"name": "Scroll Depth Units" | |
}, | |
{ | |
"accountId": "3241457577", | |
"containerId": "9092220", | |
"type": "SCROLL_DEPTH_DIRECTION", | |
"name": "Scroll Direction" | |
} | |
], | |
"fingerprint": "0", | |
"tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/3241457577/containers/9092220/versions/0?apiLink=version" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment