-
Notifications
You must be signed in to change notification settings - Fork 0
/
idg.html
351 lines (291 loc) · 21.6 KB
/
idg.html
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<script type="text/javascript">
//<!--
!function(t,e,a){a=t.createElement(e),t=t.getElementsByTagName(e)[0],a.async=1,a.src="https://spiffymachine.com/v2/0/lngCEQHz_YAjsFYkJJVbvGEzPC3SuzcfO8vY-QzxWTNe-7T95SZvotlict0EnmMIWhc25wokk7S8A",t.parentNode.insertBefore(a,t)}(document,"script"),function(t,e){t[e]=t[e]||function(){(t[e].q=t[e].q||[]).push(arguments)}}(document,window,"script","admiral");!function(t,e,n,a){function o(t){try{return t=localStorage.getItem("v4ac1eiZr0"),t&&t.split(",")[4]>0}catch(e){}return!1}function r(){var a=o();if(a){var r=t[e].pubads();typeof r.setTargeting===n&&r.setTargeting("admiral-engaged","true")}}a=t[e]=t[e]||{},a.cmd=a.cmd||[],typeof a.pubads===n?r():typeof a.cmd.unshift===n?a.cmd.unshift(r):a.cmd.push(r)}(window,"googletag","function");;;;!function(e,a,t,n){function r(){if(!window.frames[n]){var a=e.body;if(a){var t=e.createElement("iframe");t.style.display="none",t.name=n,a.appendChild(t)}else setTimeout(r,5)}}function c(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);s.q=s.q||[],"ping"===e[0]?e[2]({gdprAppliesGlobally:a.__cmpGdprAppliesGlobally||!1,cmpLoaded:!1},!0):e.length&&s.q.push(e)}function i(e){try{return JSON.parse(e)}catch(a){}}function o(e){if(e){var a,t="__cmpCall",n="string"==typeof e.data&&e.data.indexOf(t)>=0;a=n?(i(e.data)||{})[t]:(e.data||{})[t],a&&s(a.command,a.parameter,function(t,r){var c={__cmpReturn:{returnValue:t,success:r,callId:a.callId}};e.source.postMessage(n?JSON.stringify(c):c,"*")})}}var s=a[t];r(),"function"!=typeof s&&(s=a[t]=c,a.addEventListener?a.addEventListener("message",o,!1):a.attachEvent&&a.attachEvent("onmessage",o))}(document,window,"__cmp","__cmpLocator"); //-->
</script>
<script type="text/javascript">
//<!--
// Load GPT
(function() {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
window.googletag = window.googletag || {};
window.googletag.cmd = window.googletag.cmd || [];
window.googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
});
// Google Custom Search
(function() {
var cx = '010258104434575962100:h-_yirb40vi';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
// Permutive (1/2)
if (fob.config.permutive) {
window.googletag.cmd.push(function () {
if (window.googletag.pubads().getTargeting('permutive').length === 0) {
var kvs = window.localStorage.getItem('_pdfps');
window.googletag.pubads().setTargeting('permutive', kvs ? JSON.parse(kvs) : []);
}
});
}
// Google Analytics
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
var page = document.location.pathname + (document.location.pathname.charAt(document.location.pathname.length-1) == '/' ? '' : '/') + '';
ga('create', 'UA-3401770-1', { 'cookieDomain': 'none'} );
ga('create', 'UA-40525935-2', { 'name' : 'b2b', 'allowLinker': true });
var reFob = new RegExp('^https?:\/\/webwereld\.nl|^https?:\/\/computerworld\.nl|^https?:\/\/cio\.nl|^https?:\/\/itlibrary\.nl|^https?:\/\/cxo\.nl|^https?:\/\/itqa\.nl', 'i');
ga('send', 'pageview', page);
ga('b2b.send', 'pageview', page);
$(document).ready(function() {
$(document).on('click', 'a[href^=\"http://\"], a[href^=\"https://\"]', function(e) {
var link = $(this).attr('href');
var target = $(this).attr('target');
if (reFob && reFob.test && false === reFob.test(link)) {
trackOutboundLink('Externelink', link);
}
return true;
});
});
$(document).ready(function() {
if(document.referrer.match(/google\./)) {
bk_addPageCtx('google', 'true')
}
getAsyncDataFetcher().get({
insiderInit : {'referrer' : document.referrer}
});
});
//-->
</script>
<script type="text/javascript" async="async" data-comment="Index Exchange" src="//js-sec.indexww.com/ht/p/183980-263240301657151.js"></script> <script>
// Permutive (2/2)
!function(){
var perm = {"page":{"type":"homepage","audience":"consumer","language":"nl"}};
var gTax = { primaryIds : [], secondaryIds : [] }
var tax = { primaryCategories : [], secondaryCategories : [] }
//perm.page.title=document.getElementsByTagName('title')[0].textContent;
perm.page.description = document.head.querySelector("meta[name=description]").content;
if (perm.page.article) {
var a = perm.page.article;
perm.page.keywords = a.keywords
perm.page.tax = a.tax || tax;
perm.page.gTax = a.gTax || gTax;
perm.page.tags = a.tags;
perm.page.language = a.language; // overwrites default 'nl'
delete a.tags;
delete a.tax;
delete a.gTax;
delete a.language;
} else {
perm.page.keywords = [];
}
perm.page.ads = {
enabled : true,
adblocker : typeof adsAreShown == 'undefined',
}
fob.permutive.page = perm;
if (fob.config.permutive) {
!function(n,e,o,r,i){
if(!e){e=e||{},window.permutive=e,e.q=[],e.config=i||{},e.config.projectId=o,e.config.apiKey=r,e.config.environment=e.config.environment||"production";
for(var t=["addon","identify","track","trigger","query","segment","segments","ready","on","once","user","consent"],c=0;c<t.length;c++){var f=t[c];e[f]=function(n){
return function(){var o=Array.prototype.slice.call(arguments,0);e.q.push({functionName:n,arguments:o})}}(f)}}
}(document,window.permutive,"f5b3be27-f789-4ef1-8867-37c67da5b361","84c7e805-5ce9-41f4-b988-3529488bab1c",{});
permutive.addon('web', perm);
var permutiveScript = document.createElement('script');
permutiveScript.async = true;
permutiveScript.src = 'https://cdn.permutive.com/f5b3be27-f789-4ef1-8867-37c67da5b361-web.js';
document.head.appendChild(permutiveScript);
}
}();
// end of Permutive (2/2)
</script>
<script type="text/javascript">
var IDGdfpAds = {};
googletag.cmd.push(function() {
var pubads = googletag.pubads();
IDGdfpAds['ad_layer'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[1, 1], [640, 480]], 'ad_layer').setTargeting('NL_Position','ad_layer').addService(googletag.pubads());
if (Modernizr.mq('only screen and (min-width:1700px)')) {
IDGdfpAds['ad_billboard'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[2,2], [728, 90], [970, 250]], 'ad_billboard').setTargeting('NL_Position','ad_billboard').addService(googletag.pubads());
IDGdfpAds['ad_skyscraper'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[120, 600], [160, 600]], 'ad_skyscraper').setTargeting('NL_Position','ad_skyscraper').addService(googletag.pubads());
IDGdfpAds['ad_adv1'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[555, 112],[555,125]], 'ad_adv1').setTargeting('NL_Position','ad_adv1').addService(googletag.pubads());
IDGdfpAds['ad_in_page_video'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[545,306],[2,1]], 'ad_in_page_video').setTargeting('NL_Position','ad_in_page_video').addService(googletag.pubads());
IDGdfpAds['ad_mpu'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[120, 600], [160, 600], [300,250], [300, 600]], 'ad_mpu').setTargeting('NL_Position','ad_mpu').addService(googletag.pubads());
IDGdfpAds['ad_interscroller'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[970, 252]], 'ad_interscroller').setTargeting('NL_Position','ad_interscroller').addService(googletag.pubads());
IDGdfpAds['ad_leaderboard-bottom'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[728, 90]], 'ad_leaderboard-bottom').setTargeting('NL_Position','ad_leaderboard-bottom').addService(googletag.pubads());
IDGdfpAds['ad_skin-left'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[160, 1200]], 'ad_skin-left').setTargeting('NL_Position','ad_skin-left').addService(googletag.pubads());
IDGdfpAds['ad_skin-right'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[160, 1201]], 'ad_skin-right').setTargeting('NL_Position','ad_skin-right').addService(googletag.pubads());
IDGdfpAds['ad_leaderboard-top'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[728, 90],[1800, 1000]], 'ad_leaderboard-top').setTargeting('NL_Position','ad_leaderboard-top').addService(googletag.pubads());
} else if (Modernizr.mq('only screen and (min-width:1241px)')) {
IDGdfpAds['ad_billboard'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[2,2], [728, 90], [970, 250]], 'ad_billboard').setTargeting('NL_Position','ad_billboard').addService(googletag.pubads());
IDGdfpAds['ad_adv1'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[555, 112],[555,125]], 'ad_adv1').setTargeting('NL_Position','ad_adv1').addService(googletag.pubads());
IDGdfpAds['ad_in_page_video'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[545,306],[2,1]], 'ad_in_page_video').setTargeting('NL_Position','ad_in_page_video').addService(googletag.pubads());
IDGdfpAds['ad_mpu'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[120, 600], [160, 600], [300,250], [300, 600]], 'ad_mpu').setTargeting('NL_Position','ad_mpu').addService(googletag.pubads());
IDGdfpAds['ad_interscroller'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[970, 252]], 'ad_interscroller').setTargeting('NL_Position','ad_interscroller').addService(googletag.pubads());
IDGdfpAds['ad_leaderboard-bottom'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[728, 90]], 'ad_leaderboard-bottom').setTargeting('NL_Position','ad_leaderboard-bottom').addService(googletag.pubads());
IDGdfpAds['ad_skin-left'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[160, 1200]], 'ad_skin-left').setTargeting('NL_Position','ad_skin-left').addService(googletag.pubads());
IDGdfpAds['ad_skin-right'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[160, 1201]], 'ad_skin-right').setTargeting('NL_Position','ad_skin-right').addService(googletag.pubads());
IDGdfpAds['ad_leaderboard-top'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[728, 90],[1800, 1000]], 'ad_leaderboard-top').setTargeting('NL_Position','ad_leaderboard-top').addService(googletag.pubads());
} else if (Modernizr.mq('only screen and (min-width:1000px)')) {
IDGdfpAds['ad_billboard'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[2,2], [728, 90], [970, 250]], 'ad_billboard').setTargeting('NL_Position','ad_billboard').addService(googletag.pubads());
IDGdfpAds['ad_adv1'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[555, 112],[555,125]], 'ad_adv1').setTargeting('NL_Position','ad_adv1').addService(googletag.pubads());
IDGdfpAds['ad_in_page_video'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[545,306],[2,1]], 'ad_in_page_video').setTargeting('NL_Position','ad_in_page_video').addService(googletag.pubads());
IDGdfpAds['ad_mpu'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[120, 600], [160, 600], [300,250], [300, 600]], 'ad_mpu').setTargeting('NL_Position','ad_mpu').addService(googletag.pubads());
IDGdfpAds['ad_interscroller'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[970, 252]], 'ad_interscroller').setTargeting('NL_Position','ad_interscroller').addService(googletag.pubads());
IDGdfpAds['ad_leaderboard-bottom'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[728, 90]], 'ad_leaderboard-bottom').setTargeting('NL_Position','ad_leaderboard-bottom').addService(googletag.pubads());
IDGdfpAds['ad_skin-left'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[160, 1200]], 'ad_skin-left').setTargeting('NL_Position','ad_skin-left').addService(googletag.pubads());
IDGdfpAds['ad_skin-right'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[160, 1201]], 'ad_skin-right').setTargeting('NL_Position','ad_skin-right').addService(googletag.pubads());
} else if (Modernizr.mq('only screen and (min-width:780px)')) {
IDGdfpAds['ad_mpu-mob'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[300, 250], [300, 600]], 'ad_mpu-mob').setTargeting('NL_Position','ad_mpu-mob').addService(googletag.pubads());
} else if (Modernizr.mq('only screen and (min-width:500px)')) {
IDGdfpAds['ad_mpu-mob'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[300, 250], [300, 600]], 'ad_mpu-mob').setTargeting('NL_Position','ad_mpu-mob').addService(googletag.pubads());
} else if (Modernizr.mq('only screen and (max-width:499px)')) {
IDGdfpAds['ad_mpu-mob'] = googletag.defineSlot('/8456/IDG.NL_B2B_WebWereld.nl/homepage_door',[[300, 250], [300, 600]], 'ad_mpu-mob').setTargeting('NL_Position','ad_mpu-mob').addService(googletag.pubads());
}
})
function loadPersonalizedDfp() {
fob.dfp = {}
$.ajax('/ajax/dfp-user-data?hash=' + getParameterByName('hash'), {
cache : false,
dataType : 'json',
success: function(data, text, xhr) {
fob.dfp = {
data : data.data,
hash : data.hash,
};
},
complete : function() {
googletag.cmd.push(function() {
var pubads = googletag.pubads();
pubads.addEventListener('slotRenderEnded', function(e) {
if ($('#ad_mpu div').height() >= 600) {
$('#one #right').addClass('large-ad');
}
if ($('.article-list-simple .advertorial').height() != 0) {
$('.article-list-simple .advertorial').addClass('active');
}
});
if (fob.dfp.data && typeof fob.dfp.data === 'object') {
Object.keys(fob.dfp.data).forEach(function(k) {
googletag.pubads().setTargeting(k, fob.dfp.data[k]);
});
}
googletag.enableServices();
// defineAdUnits is a function defined by Adhese when this script has been loaded
typeof defineAdUnits === 'function' ? defineAdUnits() : googletag.pubads().refresh();
});
},
error : function(...args) {
console.log(args);
console.log('An error occurred while trying to set DFP user data');
}
});
}
// Consent Management
window.admiral = window.admiral || function() {(admiral.q = admiral.q || []).push(arguments)};
var debug = false;
window.idgnl = window.idgnl || {};
window.idgnl.cmp = (function() {
var debug = false;
var PERSONALIZATION_PURPOSE_ID = 2;
var checkIfInEU = new Promise(function(resolve, reject) {
var promiseResolved = false;
setTimeout(function() {
if(debug) { console.log('GDPR checkIfInEU timeout reached promiseResolved', promiseResolved); }
if (!promiseResolved) {
promiseResolved=true;
resolve(); // effectively in eu (most conservative)
}
}, 10000);
window.admiral('after', 'cmp.loaded', function(e) {
if (promiseResolved) { return; }
promiseResolved = true;
if (debug) { console.log('GDPR checkIfInEU - cmp.loaded', e); }
var isEuVisitor = e.euVisitor || false;
if (isEuVisitor) { resolve(); }
else { reject(); }
});
});
// util to check for 1 purpose or 1 vendor in consent data structure
var checkConsentData = function(ConsentData, purposeId, vendorId){
var _ConsentData = {standardPurposes:{}}; // normalise due to different naming conventions
if ('standardPurposes' in ConsentData) { // prefer standardPurposes as defined on PublisherConsents which is not global and does not return early
_ConsentData.standardPurposes = ConsentData.standardPurposes
} else if('purposeConsents' in ConsentData) { //comes from Vendor Consents
_ConsentData.standardPurposes = ConsentData.purposeConsents
}
_ConsentData.vendorConsents = ConsentData.vendorConsents || {}; //comes from VendorConsents
_ConsentData.customPurposes = ConsentData.customPurposes || {}; //comes from PublisherConsents
if (debug) { console.log('GDPR', 'checkConsentData', 'purposeId', purposeId, 'vendorId', vendorId, _ConsentData); }
if (typeof vendorId !== 'undefined'){
if (vendorId in _ConsentData.vendorConsents && _ConsentData.vendorConsents[''+vendorId]){
return true;
}
//vendor id match is wanted but is false or not defined
return false;
}
if (typeof purposeId !== 'undefined' && purposeId !== null){
if( (purposeId in _ConsentData.standardPurposes && _ConsentData.standardPurposes[''+purposeId]) ||
(purposeId in _ConsentData.customPurposes && _ConsentData.customPurposes[''+purposeId])
) {
return true;
}
}
if (debug) { console.log('GDPR','checkConsentData',false); }
return false;
};
//util create promise for cmp for a purposeid
var checkCMPForPurposeConsent = function(purposeId) {
return new Promise(function (resolve, reject) {
checkIfInEU.then(function() {
__cmp('getPublisherConsents', [], function(PublisherConsents, success){
if (debug) {
console.log('GDPR',' checkCMPForPurposeConsent - PublisherConsents ','purposeId', purposeId, 'PublisherConsents=' ,PublisherConsents, 'success=', success);
}
resolve(checkConsentData(PublisherConsents,purposeId));
});
}).catch(function(){
resolve(true);
});
});
};
return {
isDebug : function() { return debug; },
adsense : checkCMPForPurposeConsent(PERSONALIZATION_PURPOSE_ID),
gpt : checkCMPForPurposeConsent(PERSONALIZATION_PURPOSE_ID)
};
})();
//googletag.cmd = googletag.cmd || [];
if (window.idgnl.cmp) {
if (debug) { console.log('GDPR','gpt.js delayed loading'); }
window.idgnl.cmp.gpt.then( function(hasConsent) {
googletag.pubads().collapseEmptyDivs(true);
googletag.pubads().enableLazyLoad({
fetchMarginPercent: 100, // Fetch slots within 1 viewports.
renderMarginPercent: 25, // Render slots within 0.25 viewports.
mobileScaling: 2.0 // Double the above values on mobile.
});
if (hasConsent) {
loadPersonalizedDfp();
} else {
googletag.cmd.unshift(function() {
if (debug) { console.log('GDPR','setRequestNonPersonalizedAds set'); }
googletag.pubads().setRequestNonPersonalizedAds(1);
googletag.enableServices();
googletag.pubads().refresh();
});
}
});
} else {
if (debug) { console.log('GDPR','gpt.js delayed loading skipped'); }
}
</script>