Instantly share code, notes, and snippets.
Created
April 30, 2018 13:10
-
Star
1
(1)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save shirokoweb/17f7c95cfc99f575560802a4407ab3b8 to your computer and use it in GitHub Desktop.
GTM Cookiepermission GDPR
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": "2018-04-30 13:08:19", | |
"containerVersion": { | |
"path": "accounts/2719250224/containers/8610498/versions/13", | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"containerVersionId": "13", | |
"container": { | |
"path": "accounts/2719250224/containers/8610498", | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"name": "elevageduchampdesmerles.fr", | |
"publicId": "GTM-NJW48BQ", | |
"usageContext": [ | |
"WEB" | |
], | |
"fingerprint": "1525092698507", | |
"tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/2719250224/containers/8610498/workspaces?apiLink=container" | |
}, | |
"tag": [ | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"tagId": "21", | |
"name": "UA-52910824-3", | |
"type": "ua", | |
"parameter": [ | |
{ | |
"type": "BOOLEAN", | |
"key": "overrideGaSettings", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "trackType", | |
"value": "TRACK_PAGEVIEW" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "gaSettings", | |
"value": "{{UA-52910824-3}}" | |
} | |
], | |
"fingerprint": "1525085348179", | |
"firingTriggerId": [ | |
"30", | |
"33" | |
], | |
"tagFiringOption": "ONCE_PER_EVENT" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"tagId": "20", | |
"name": "cookiepermission - REFUS", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script>\n console.log(\"Le visiteur refuse l'utilisation de cookies\");\n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1525085314837", | |
"firingTriggerId": [ | |
"29", | |
"31" | |
], | |
"parentFolderId": "28", | |
"tagFiringOption": "ONCE_PER_EVENT" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"tagId": "19", | |
"name": "cookiepermission - demande", | |
"type": "html", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "html", | |
"value": "<script>\n function setCookie(value, box) {\n var d = new Date();\n d.setTime(d.getTime() + ({{cookiepermission - expiry}}*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = '{{cookiepermission - cookiename}}' + \"=\" + value + \"; \" + expires;\n \n // remove box\n box.style.display = 'none';\n \n if (value == \"yes\")\n dataLayer.push( { event: 'cookiepermission first page yes' } );\n else\n dataLayer.push( { event: 'cookiepermission first page no' } );\n \n }\n \n var txt = \"{{cookiepermission - question}}\";\n var cookiepermissionDialogbox = document.createElement(\"div\");\n cookiepermissionDialogbox.id = 'cp-overlay';\n cookiepermissionDialogbox.style.position = \"fixed\";\n cookiepermissionDialogbox.style.top = \"0px\";\n cookiepermissionDialogbox.style.width = \"100%\";\n cookiepermissionDialogbox.style.height = \"100%\";\n cookiepermissionDialogbox.style.zIndex = \"1000000\";\n cookiepermissionDialogbox.style.backgroundColor = \"rgba(0, 0, 0, 0.5)\";\n \n cpdiv = document.createElement(\"div\");\n cpdiv.id = 'cp-inner';\n cpdiv.style.textAlign = \"center\";\n cpdiv.style.backgroundColor = \"white\";\n cpdiv.style.margin = \"auto\";\n cpdiv.style.width = \"50%\";\n cpdiv.style.padding = \"70px\";\n cpdiv.style.opacity = \"1\";\n \n cpQuestion = document.createElement(\"h2\");\n cpQuestion.id = 'cp-question';\n cpQuestion.style.textAlign = \"center\";\n cpQuestion.innerHTML = txt;\n \n cpURL = document.createElement(\"a\");\n cpURL.setAttribute(\"href\", \"{{cookiepermission - url}}\");\n cpURL.innerHTML = '{{cookiepermission - texte url}}';\n \n cpOptiondiv = document.createElement(\"div\");\n cpOptiondiv.id = 'cp-options';\n cpOptiondiv.style.textAlign = \"center\";\n \n cpSep = document.createElement(\"span\");\n cpSep.class = \"cp-separator\";\n cpSep.innerHTML = ' - ';\n \n cpYes = document.createElement(\"span\");\n cpYes.id = \"cp-yes\";\n \n cpYesA = document.createElement(\"a\");\n cpYesA.setAttribute(\"href\", \"#\");\n cpYesA.setAttribute(\"onclick\", \"javascript:setCookie('yes', cookiepermissionDialogbox);\");\n cpYesA.innerHTML = '{{cookiepermission - yes text}}';\n \n cpNo = document.createElement(\"span\");\n cpNo.id = \"cp-no\";\n \n cpNoA = document.createElement(\"a\");\n cpNoA.setAttribute(\"href\", \"#\");\n cpNoA.setAttribute(\"onclick\", \"javascript:setCookie('no', cookiepermissionDialogbox);\");\n cpNoA.innerHTML = '{{cookiepermission - no text}}';\n \n // insert into body \n document.body.appendChild(cookiepermissionDialogbox);\n \n cookiepermissionDialogbox.appendChild(cpdiv);\n cpdiv.appendChild(cpQuestion);\n cpdiv.appendChild(cpURL);\n cpdiv.appendChild(cpOptiondiv);\n cpOptiondiv.appendChild(cpYes);\n cpOptiondiv.appendChild(cpSep);\n cpOptiondiv.appendChild(cpNo);\n cpYes.appendChild(cpYesA);\n cpNo.appendChild(cpNoA);\n // cpdiv.appendChild(cpURL);\n \n</script>" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "supportDocumentWrite", | |
"value": "false" | |
} | |
], | |
"fingerprint": "1525092691078", | |
"firingTriggerId": [ | |
"32" | |
], | |
"blockingTriggerId": [ | |
"39" | |
], | |
"parentFolderId": "28", | |
"tagFiringOption": "ONCE_PER_EVENT" | |
} | |
], | |
"trigger": [ | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"triggerId": "29", | |
"name": "cookiepermission - firstpage no", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "cookiepermission first page no" | |
} | |
] | |
} | |
], | |
"fingerprint": "1525010764654", | |
"parentFolderId": "28" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"triggerId": "30", | |
"name": "cookiepermission - firstpage yes", | |
"type": "CUSTOM_EVENT", | |
"customEventFilter": [ | |
{ | |
"type": "EQUALS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{_event}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "cookiepermission first page yes" | |
} | |
] | |
} | |
], | |
"fingerprint": "1525086263331", | |
"parentFolderId": "28" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"triggerId": "31", | |
"name": "cookiepermission - no", | |
"type": "PAGEVIEW", | |
"filter": [ | |
{ | |
"type": "CONTAINS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{cookiepermission - content}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "no" | |
} | |
] | |
} | |
], | |
"fingerprint": "1525010764661", | |
"parentFolderId": "28" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"triggerId": "32", | |
"name": "cookiepermission - unknown", | |
"type": "PAGEVIEW", | |
"filter": [ | |
{ | |
"type": "MATCH_REGEX", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{cookiepermission - content}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "yes|no" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "negate", | |
"value": "true" | |
} | |
] | |
} | |
], | |
"fingerprint": "1525010764661", | |
"parentFolderId": "28" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"triggerId": "33", | |
"name": "cookiepermission - yes", | |
"type": "PAGEVIEW", | |
"filter": [ | |
{ | |
"type": "CONTAINS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{cookiepermission - content}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "yes" | |
} | |
] | |
} | |
], | |
"fingerprint": "1525010764663", | |
"parentFolderId": "28" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"triggerId": "39", | |
"name": "exception", | |
"type": "PAGEVIEW", | |
"filter": [ | |
{ | |
"type": "CONTAINS", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "arg0", | |
"value": "{{Page URL}}" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "arg1", | |
"value": "https://elevageduchampdesmerles.fr/mentions-legales/" | |
} | |
] | |
} | |
], | |
"fingerprint": "1525092450558" | |
} | |
], | |
"variable": [ | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"variableId": "19", | |
"name": "UA-52910824-3", | |
"type": "gas", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "cookieDomain", | |
"value": "auto" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "doubleClick", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "setTrackerName", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "useDebugVersion", | |
"value": "false" | |
}, | |
{ | |
"type": "LIST", | |
"key": "fieldsToSet", | |
"list": [ | |
{ | |
"type": "MAP", | |
"map": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "fieldName", | |
"value": "anonymizeIp" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "true" | |
} | |
] | |
}, | |
{ | |
"type": "MAP", | |
"map": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "fieldName", | |
"value": "forceSSL" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "true" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "useHashAutoLink", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "decorateFormsAutoLink", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "enableLinkId", | |
"value": "false" | |
}, | |
{ | |
"type": "BOOLEAN", | |
"key": "enableEcommerce", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "trackingId", | |
"value": "UA-52910824-3" | |
} | |
], | |
"fingerprint": "1525092084577", | |
"parentFolderId": "28", | |
"formatValue": {} | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"variableId": "14", | |
"name": "cookiepermission - content", | |
"type": "k", | |
"parameter": [ | |
{ | |
"type": "BOOLEAN", | |
"key": "decodeCookie", | |
"value": "false" | |
}, | |
{ | |
"type": "TEMPLATE", | |
"key": "name", | |
"value": "{{cookiepermission - cookiename}}" | |
} | |
], | |
"fingerprint": "1525010764659", | |
"parentFolderId": "28" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"variableId": "13", | |
"name": "cookiepermission - cookiename", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "cookiepermission" | |
} | |
], | |
"fingerprint": "1525010764657", | |
"parentFolderId": "28" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"variableId": "15", | |
"name": "cookiepermission - expiry", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "365" | |
} | |
], | |
"fingerprint": "1525010764665", | |
"parentFolderId": "28" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"variableId": "16", | |
"name": "cookiepermission - no text", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "Je refuse" | |
} | |
], | |
"fingerprint": "1525012776906", | |
"parentFolderId": "28", | |
"formatValue": {} | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"variableId": "17", | |
"name": "cookiepermission - question", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "Ce site utilise des cookies de mesure d'audience. Ces cookies nous servent à améliorer l'expérience utilisateur. Vous avez la possibilité de vous opposer à cette collecte." | |
} | |
], | |
"fingerprint": "1525089913093", | |
"parentFolderId": "28", | |
"formatValue": {} | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"variableId": "23", | |
"name": "cookiepermission - texte url", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "Consulter notre déclaration relative aux cookies" | |
} | |
], | |
"fingerprint": "1525091884820", | |
"parentFolderId": "28", | |
"formatValue": {} | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"variableId": "22", | |
"name": "cookiepermission - url", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "https://elevageduchampdesmerles.fr/mentions-legales/" | |
} | |
], | |
"fingerprint": "1525089427619", | |
"parentFolderId": "28", | |
"formatValue": {} | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"variableId": "18", | |
"name": "cookiepermission - yes text", | |
"type": "c", | |
"parameter": [ | |
{ | |
"type": "TEMPLATE", | |
"key": "value", | |
"value": "J'accepte" | |
} | |
], | |
"fingerprint": "1525012765451", | |
"parentFolderId": "28", | |
"formatValue": {} | |
} | |
], | |
"folder": [ | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"folderId": "28", | |
"name": "cookiepermission", | |
"fingerprint": "1525010764653" | |
} | |
], | |
"builtInVariable": [ | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"type": "PAGE_URL", | |
"name": "Page URL" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"type": "PAGE_HOSTNAME", | |
"name": "Page Hostname" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"type": "PAGE_PATH", | |
"name": "Page Path" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"type": "REFERRER", | |
"name": "Referrer" | |
}, | |
{ | |
"accountId": "2719250224", | |
"containerId": "8610498", | |
"type": "EVENT", | |
"name": "Event" | |
} | |
], | |
"fingerprint": "1525093686159", | |
"tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/2719250224/containers/8610498/versions/13?apiLink=version" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Merci pour le partage. Si je veux personnaliser le fait d'ajouter ou non le tracking Hotjar, Drift (pour le chat) et GA individuellement c'est possible ??