-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathskin2.js
42 lines (37 loc) · 1.26 KB
/
skin2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var adUnitsSkin = [
{
code: '/4362169/Ad_test',
sizes: [[300,250]],
bids: [{
bidder: 'rubicon',params:{
accountId: "14062",
siteId: "70608",
zoneId: "335918",
}
}]
}];
var divAntoine = document.createElement('div');
divAntoine.id = 'testAntoine';
document.body.insertBefore(divAntoine, document.body.firstChild);
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
pbjs.adserverRequestSent = false
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
googletag.defineSlot('/4362169/Ad_test', [300,250], 'testAntoine').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.pubads().collapseEmptyDivs();
googletag.enableServices();
});
function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}