Browse Source

Add Google Adsense Search Fix #952

Amauri CHAMPEAUX 3 years ago
parent
commit
36b1d72189
1 changed files with 21 additions and 0 deletions
  1. 21 0
      tarteaucitron.services.js

+ 21 - 0
tarteaucitron.services.js

@@ -1804,6 +1804,27 @@ tarteaucitron.services.adsense = {
     }
 };
 
+// Google Adsense Search
+tarteaucitron.services.adsensesearch = {
+    "key": "adsensesearch",
+    "type": "ads",
+    "name": "Google Adsense Search",
+    "uri": "https://adssettings.google.com/",
+    "needConsent": true,
+    "readmoreLink": "https://policies.google.com/technologies/partner-sites",
+    "cookies": ['__gads'],
+    "js": function () {
+        "use strict";
+        tarteaucitron.addScript('https://www.google.com/adsense/search/ads.js');
+        (function(g,o){g[o]=g[o]||function(){(g[o]['q']=g[o]['q']||[]).push(arguments)},g[o]['t']=1*new Date})(window,'_googCsa');
+    },
+    "fallback": function () {
+        "use strict";
+        var id = 'adsensesearch';
+        tarteaucitron.fallback(['afscontainer1'], tarteaucitron.engage(id));
+    }
+};
+
 // google partners badge
 tarteaucitron.services.googlepartners = {
     "key": "googlepartners",