Merge pull request #193 from javiertury/bing-ads
Add support for Bing Ads Universal Event Tracking
This commit is contained in:
commit
7f06efc0bd
|
|
@ -2298,3 +2298,31 @@ tarteaucitron.services.matomo = {
|
|||
tarteaucitron.addScript(tarteaucitron.user.matomoHost + 'piwik.js', '', '', true, 'defer', true);
|
||||
}
|
||||
};
|
||||
|
||||
// bing ads universal event tracking
|
||||
tarteaucitron.services.bingads = {
|
||||
'key': 'bingads',
|
||||
'type': 'ads',
|
||||
'name': 'Bing Ads Universal Event Tracking',
|
||||
'uri': 'https://advertise.bingads.microsoft.com/en-us/resources/policies/personalized-ads',
|
||||
'needConsent': true,
|
||||
'cookies': ['_uetmsclkid'],
|
||||
'js': function () {
|
||||
'use strict';
|
||||
var u = tarteaucitron.user.bingadsTag || 'uetq';
|
||||
window[u] = window[u] || [];
|
||||
|
||||
tarteaucitron.addScript('https://bat.bing.com/bat.js', '', function () {
|
||||
var bingadsCreate = {ti: tarteaucitron.user.bingadsID};
|
||||
|
||||
if ('bingadsStoreCookies' in tarteaucitron.user) {
|
||||
bingadsCreate['storeConvTrackCookies'] = tarteaucitron.user.bingadsStoreCookies;
|
||||
}
|
||||
|
||||
bingadsCreate.q = window[u];
|
||||
window[u] = new UET(bingadsCreate);
|
||||
window[u].push('pageload');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue