From afd04a7d3db1b3bec80dfaa0ee2f52220c7cb125 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 3 Jun 2022 14:09:44 +0200 Subject: [PATCH] Add Adsense Automatic #957 --- tarteaucitron.services.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 846df09..e60d4a8 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1804,6 +1804,26 @@ tarteaucitron.services.adsense = { } }; + +// google adsense automatic +tarteaucitron.services.adsenseauto = { + "key": "adsenseauto", + "type": "ads", + "name": "Google Adsense Automatic", + "uri": "https://adssettings.google.com/", + "needConsent": true, + "readmoreLink": "https://policies.google.com/technologies/partner-sites", + "cookies": ['__gads'], + "js": function () { + "use strict"; + + if (tarteaucitron.user.adsensecapub === undefined) { + return; + } + tarteaucitron.addScript('https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=' + tarteaucitron.user.adsensecapub, '', '', '', 'crossorigin', 'anonymous'); + } +}; + // Google Adsense Search tarteaucitron.services.adsensesearch = { "key": "adsensesearch",