3 && args[2] === 2 && typeof args[3] === “boolean” ) { gdprApplies = args[3]; if (typeof args[2] === “function”) { args[2](“set”, true); } } } else if (args[0] === “ping”) { var retr = { gdprApplies: gdprApplies, cmpLoaded: false, cmpStatus: “stub”, }; if (typeof args[2] === “function”) { args[2](retr); } } else { if (args[0] === “init” && typeof args[3] === “object”) { args[3] = Object.assign(args[3], { tag_version: “V2” }); } queue.push(args); } } function postMessageEventHandler(event) { var msgIsString = typeof event.data === “string”; var json = {}; try { if (msgIsString) { json = JSON.parse(event.data); } else { json = event.data; } } catch (ignore) {} var payload = json.__tcfapiCall; if (payload) { window.__tcfapi( payload.command, payload.version, function (retValue, success) { var returnMsg = { __tcfapiReturn: { returnValue: retValue, success: success, callId: payload.callId, }, }; if (msgIsString) { returnMsg = JSON.stringify(returnMsg); } if (event && event.source && event.source.postMessage) { event.source.postMessage(returnMsg, “*”); } }, payload.parameter ); } } while (win) { try { if (win.frames[TCF_LOCATOR_NAME]) { cmpFrame = win; break; } } catch (ignore) {} if (win === window.top) { break; } win = win.parent; } if (!cmpFrame) { addFrame(); win.__tcfapi = tcfAPIHandler; win.addEventListener(“message”, postMessageEventHandler, false); } } makeStub(); var uspStubFunction = function () { var arg = arguments; if (typeof window.__uspapi !== uspStubFunction) { setTimeout(function () { if (typeof window.__uspapi !== “undefined”) { window.__uspapi.apply(window.__uspapi, arg); } }, 500); } }; var checkIfUspIsReady = function () { uspTries++; if (window.__uspapi === uspStubFunction && uspTries = 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) /* or $(window).height() */ && rect.right <= (window.innerWidth || document.documentElement.clientWidth) /* or $(window).width() */ ); }; googletag.cmd.push(function () { var homeLeaderboardMapping = googletag .sizeMapping() .addSize( [992, 0], [ [970, 250], [970, 90], [728, 90], [300, 250], [1, 1], ] ) //desktop .addSize( [768, 0], [ [300, 250], [728, 90], [468, 60], [1, 1], ] ) //tablet .addSize( [0, 0], [ [320, 50], [320, 100], [300, 250], [300, 50], [1, 1], ] ) //mobile .build(); bmwblogAdSlots.push({ slot: googletag .defineSlot( "/1022709/728x90TopBanner", [ [970, 250], [970, 90], [728, 90], [468, 60], [320, 50], [320, 100], [300, 250], [300, 50], [1, 1], ], "div-gpt-ad-1428786085190-0" ) .defineSizeMapping(homeLeaderboardMapping) .addService(googletag.pubads()), didFetch: false, didRender: false, divId: "div-gpt-ad-1428786085190-0", adPath: "/1022709/728x90TopBanner", sizes: [ [970, 250], [970, 90], [728, 90], [468, 60], [320, 50], [320, 100], [300, 250], [300, 50], [1, 1], ], }); var articleTopMapping = googletag .sizeMapping() .addSize( [992, 0], [ [728, 90],...
Source