|
@@ -371,6 +371,28 @@ tarteaucitron.services.googlemaps = {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+// google tag manager
|
|
|
|
+tarteaucitron.services.googletagmanager = {
|
|
|
|
+ "key": "googletagmanager",
|
|
|
|
+ "type": "api",
|
|
|
|
+ "name": "Google Tag Manager",
|
|
|
|
+ "uri": "http://www.google.com/ads/preferences/",
|
|
|
|
+ "needConsent": true,
|
|
|
|
+ "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
|
|
|
|
+ "js": function () {
|
|
|
|
+ "use strict";
|
|
|
|
+ if (tarteaucitron.user.googletagmanagerId === undefined) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ window.dataLayer = window.dataLayer || [];
|
|
|
|
+ window.dataLayer.push({
|
|
|
|
+ 'gtm.start': new Date().getTime(),
|
|
|
|
+ event: 'gtm.js'
|
|
|
|
+ });
|
|
|
|
+ tarteaucitron.addScript('//www.googletagmanager.com/gtm.js?id=' + tarteaucitron.user.googletagmanagerId);
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
// jsapi
|
|
// jsapi
|
|
tarteaucitron.services.jsapi = {
|
|
tarteaucitron.services.jsapi = {
|
|
"key": "jsapi",
|
|
"key": "jsapi",
|