Google Adsense Search support
This commit is contained in:
parent
c762ed3209
commit
7b356f481b
|
|
@ -366,7 +366,7 @@ tarteaucitron.services.gplusbadge = {
|
||||||
tarteaucitron.services.adsense = {
|
tarteaucitron.services.adsense = {
|
||||||
"key": "adsense",
|
"key": "adsense",
|
||||||
"type": "ads",
|
"type": "ads",
|
||||||
"name": "Adsense (Google)",
|
"name": "Google Adsense",
|
||||||
"uri": "http://www.google.com/ads/preferences/",
|
"uri": "http://www.google.com/ads/preferences/",
|
||||||
"needConsent": true,
|
"needConsent": true,
|
||||||
"cookies": [],
|
"cookies": [],
|
||||||
|
|
@ -381,6 +381,45 @@ tarteaucitron.services.adsense = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// google adsense search (form)
|
||||||
|
tarteaucitron.services.adsensesearchform = {
|
||||||
|
"key": "adsensesearchform",
|
||||||
|
"type": "ads",
|
||||||
|
"name": "Google Adsense Search (form)",
|
||||||
|
"uri": "http://www.google.com/ads/preferences/",
|
||||||
|
"needConsent": true,
|
||||||
|
"cookies": [],
|
||||||
|
"js": function () {
|
||||||
|
"use strict";
|
||||||
|
tarteaucitron.addScript('//www.google.com/coop/cse/brand?form=cse-search-box&lang=' + tarteaucitron.getLanguage());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// google adsense search (result)
|
||||||
|
tarteaucitron.services.adsensesearchresult = {
|
||||||
|
"key": "adsensesearchresult",
|
||||||
|
"type": "ads",
|
||||||
|
"name": "Google Adsense Search (result)",
|
||||||
|
"uri": "http://www.google.com/ads/preferences/",
|
||||||
|
"needConsent": true,
|
||||||
|
"cookies": [],
|
||||||
|
"js": function () {
|
||||||
|
"use strict";
|
||||||
|
if (tarteaucitron.user.adsensesearchresultCx === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
tarteaucitron.addScript('//www.google.com/cse/cse.js?cx=' + tarteaucitron.user.adsensesearchresultCx);
|
||||||
|
},
|
||||||
|
"fallback": function () {
|
||||||
|
"use strict";
|
||||||
|
var id = 'adsensesearchresult';
|
||||||
|
|
||||||
|
if (document.getElementById('gcse_searchresults')) {
|
||||||
|
document.getElementById('gcse_searchresults').innerHTML = tarteaucitron.engage(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// googleadwordsconversion
|
// googleadwordsconversion
|
||||||
tarteaucitron.services.googleadwordsconversion = {
|
tarteaucitron.services.googleadwordsconversion = {
|
||||||
"key": "googleadwordsconversion",
|
"key": "googleadwordsconversion",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue