Browse Source

Add Xandr

Amauri CHAMPEAUX 4 years ago
parent
commit
e2524bd6b4
1 changed files with 32 additions and 0 deletions
  1. 32 0
      tarteaucitron.services.js

+ 32 - 0
tarteaucitron.services.js

@@ -30,6 +30,38 @@ tarteaucitron.services.iframe = {
     }
 };
 
+// xandr
+tarteaucitron.services.xandr = {
+    "key": "xandr",
+    "type": "ads",
+    "name": "Xandr",
+    "uri": "https://www.xandr.com/privacy/cookie-policy/",
+    "needConsent": true,
+    "cookies": ['uuid2', 'uids', 'sess', 'icu', 'anj', 'usersync'],
+    "js": function () {
+        "use strict";
+        if (tarteaucitron.user.xandrId === undefined) {
+            return;
+        }
+
+        if (!window.pixie) {
+            var n = window.pixie = function(e, i, a) {
+                n.actionQueue.push({
+                    action: e,
+                    actionValue: i,
+                    params: a
+                })
+            };
+            n.actionQueue = [];
+        }
+
+        tarteaucitron.addScript('https://acdn.adnxs.com/dmp/up/pixie.js', '', function() {
+            window.pixie('init', tarteaucitron.user.xandrId);
+            window.pixie('event', 'PageView');
+        });
+    }
+};
+
 // helloasso
 tarteaucitron.services.helloasso = {
     "key": "helloasso",