Browse Source

Google Adwords remarketing tracking support

Amauri CHAMPEAUX 10 years ago
parent
commit
2503634539
1 changed files with 23 additions and 0 deletions
  1. 23 0
      tarteaucitron.services.js

+ 23 - 0
tarteaucitron.services.js

@@ -68,6 +68,29 @@ tarteaucitron.services.addtoanyshare = {
     }
 };
 
+// adwordsremarketing
+tarteaucitron.services.adwordsremarketing = {
+    "key": "adwordsremarketing",
+    "type": "ads",
+    "name": "Adwords (remarketing)",
+    "uri": "https://www.google.com/settings/ads",
+    "needConsent": true,
+    "cookies": [],
+    "js": function () {
+        "use strict";
+        if (tarteaucitron.user.adwordsremarketingId === undefined) {
+            return;
+        }
+        
+        tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () {
+            window.google_trackConversion({
+                google_conversion_id: tarteaucitron.user.adwordsremarketingId,
+                google_remarketing_only: true
+            });
+        });
+    }
+};
+
 // alexa
 tarteaucitron.services.alexa = {
     "key": "alexa",