Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var pulseCount = 0, init = null;
- function pulse() {
- if (window['9f5659dc_init']) {
- init = window['9f5659dc_init'][0];
- var i = document.getElementsByTagName("body");
- window.CEDATO_INIT=(window.CEDATO_INIT || {});
- var ifa = init.aid;
- if (ifa === '')
- {
- ifa = init.ifa;
- }
- (new Image).src = "https://logs-01.loggly.com/inputs/ad71b1c5-a4cd-4d35-a773-ac0951984313.gif?event=load&bundleId=" + encodeURIComponent(init.bundleId) + "&idfa=" + (init.ifa) + "&ua=" + encodeURIComponent(navigator.userAgent) + "&exchangeId=" + encodeURIComponent(init.exchangeId) + "&placementId=" + encodeURIComponent(init.placementId) + "&campaignId=" + encodeURIComponent(init.campaignId);
- if (i && i[0])
- {
- (new Image).src = "https://track.iserveads.com/pixel?e=loade&bundle=" + encodeURIComponent(init.bundleId) + "&idfa=" + encodeURIComponent(init.idfa) + "&ua=" + encodeURIComponent(navigator.userAgent) + "&ip=" + init.deviceIp + "&h=true&s=true";
- //(new Image).src = "https://logs-01.loggly.com/inputs/ad71b1c5-a4cd-4d35-a773-ac0951984313.gif?event=prebid_ok&bundleId=" + encodeURIComponent(init.bundleId) + "&idfa=" + (init.ifa) + "&ua=" + encodeURIComponent(navigator.userAgent) + "&prebidUrl=" + encodeURIComponent(prebidUrl);
- //(new Image).src = "https://logs-01.loggly.com/inputs/ad71b1c5-a4cd-4d35-a773-ac0951984313.gif?event=ifa_test&ifa=" + encodeURIComponent(init.ifa) + "&aid=" + encodeURIComponent(init.aid) + "&picked=" + encodeURIComponent(ifa) + "&pulseCount=" + pulseCount + "&campaignId=" + encodeURIComponent(init.campaignId) + "&placementId=" + encodeURIComponent(init.placementId) + "&bundleId=" + encodeURIComponent(init.bundleId) + "&initCount=" + window['9f5659dc_init'].length + "&bidId=" + init.bidId + "&cb=" + init.cb + "&lat=" + encodeURIComponent(init.lat) + "&lon=" + encodeURIComponent(init.lon);
- (new Image).src = "https://t.iserveads.com/track?e=11&cb=" + encodeURIComponent(init.cb) + "&bundleId=" + encodeURIComponent(init.bundleId) + "&bidId=" + encodeURIComponent(init.bidId) + "&ip=" + encodeURIComponent(init.deviceIp) + "&d=" + encodeURIComponent(ifa) + "&lat=" + encodeURIComponent(init.lat) + "&lon=" + encodeURIComponent(init.lon);
- if (init.lat === "-1.000000")
- {
- init.lat = '';
- init.lon = '';
- }
- var ad = "<iframe src='https://ads.iserveads.com/ad_" + init.w + "x" + init.h + ".html' frameborder='0' scrolling='no' width='" + init.w + "' height='" + init.h + "'></iframe>";
- var c = document.createElement("div");
- c.style.width = init.w + "px";
- c.style.height = init.h + "px";
- c.style.position = "fixed";
- c.style.zIndex = 20;
- c.style.top = 0;
- c.style.left = 0;
- c.style.backgroundColor = "#000000";
- c.innerHTML = ad;
- i[0].appendChild(c);
- var cb = new Date().getTime();
- var elementId = "video" + init.campaignId + cb;
- var d = document.createElement("div");
- d.setAttribute("id", elementId);
- d.style.width = init.w + "px",
- d.style.height = init.h + "px",
- d.style.position = "fixed",
- d.style.zIndex = 10,
- d.style.top = 0,
- d.style.left = 0,
- i[0].appendChild(d);
- generateCedatoTag(new Date().getTime(), init.campaignId, "https://ads.iserveads.com/player_115.77_y.js",
- "", "loclong=" + encodeURIComponent(init.lon) + "&sid=" + encodeURIComponent(init.bundleId) + "&d=" + encodeURIComponent(init.bundleId) + "&pv=115.77&ifa=" + encodeURIComponent(ifa) + "&cb=" + cb + "&appb=" + encodeURIComponent(init.bundleId) + "&loclat=" + encodeURIComponent(init.lat) + "&loclong=" + encodeURIComponent(init.lon) + "&h=" + encodeURIComponent(init.h) + "&w=" + encodeURIComponent(init.w) + "&dnt=0&p=" + init.campaignId + "&mid=ads.iserveads.com&se=d54d541b-e64e-475d-83fc-9e1d6cc63fde&ssl=1&cirBreak=1", "", "115.77");
- /*
- var prebidUrl = 'https://rtb.lkqd.net/ad?pid=49&sid=1129007&output=json2&support=html5&execution=any&placement=&playinit=auto&volume=100&width=320&height=480&dnt=0&appname=' + encodeURIComponent(init.bundleId) + '&bundleid=' + encodeURIComponent(init.bundleId) + '&appstoreurl=&aid=' + encodeURIComponent(ifa) + '&idfa=' + encodeURIComponent(ifa) + '&loclat=&loclong=&loc=&rnd=' + (Math.random()*10000);
- var oReq = new XMLHttpRequest();
- oReq.onload = function(e) {
- var response = oReq.response;
- if (response.includes("ministerial"))
- {
- (new Image).src = "https://logs-01.loggly.com/inputs/ad71b1c5-a4cd-4d35-a773-ac0951984313.gif?event=prebid_ok&bundleId=" + encodeURIComponent(init.bundleId) + "&idfa=" + (init.ifa) + "&ua=" + encodeURIComponent(navigator.userAgent) + "&prebidUrl=" + encodeURIComponent(prebidUrl);
- //(new Image).src = "https://logs-01.loggly.com/inputs/ad71b1c5-a4cd-4d35-a773-ac0951984313.gif?event=ifa_test&ifa=" + encodeURIComponent(init.ifa) + "&aid=" + encodeURIComponent(init.aid) + "&picked=" + encodeURIComponent(ifa) + "&pulseCount=" + pulseCount + "&campaignId=" + encodeURIComponent(init.campaignId) + "&placementId=" + encodeURIComponent(init.placementId) + "&bundleId=" + encodeURIComponent(init.bundleId) + "&initCount=" + window['9f5659dc_init'].length + "&bidId=" + init.bidId + "&cb=" + init.cb + "&lat=" + encodeURIComponent(init.lat) + "&lon=" + encodeURIComponent(init.lon);
- (new Image).src = "https://t.iserveads.com/track?e=11&cb=" + encodeURIComponent(init.cb) + "&bundleId=" + encodeURIComponent(init.bundleId) + "&bidId=" + encodeURIComponent(init.bidId) + "&ip=" + encodeURIComponent(init.deviceIp) + "&d=" + encodeURIComponent(ifa) + "&lat=" + encodeURIComponent(init.lat) + "&lon=" + encodeURIComponent(init.lon);
- if (init.lat === "-1.000000")
- {
- init.lat = '';
- init.lon = '';
- }
- var ad = "<iframe src='https://ads.iserveads.com/ad_" + init.w + "x" + init.h + ".html' frameborder='0' scrolling='no' width='" + init.w + "' height='" + init.h + "'></iframe>";
- var c = document.createElement("div");
- c.style.width = init.w + "px";
- c.style.height = init.h + "px";
- c.style.position = "fixed";
- c.style.zIndex = 20;
- c.style.top = 0;
- c.style.left = 0;
- c.style.backgroundColor = "#000000";
- c.innerHTML = ad;
- i[0].appendChild(c);
- var cb = new Date().getTime();
- var elementId = "video" + init.campaignId + cb;
- var d = document.createElement("div");
- d.setAttribute("id", elementId);
- d.style.width = init.w + "px",
- d.style.height = init.h + "px",
- d.style.position = "fixed",
- d.style.zIndex = 10,
- d.style.top = 0,
- d.style.left = 0,
- i[0].appendChild(d);
- generateCedatoTag(new Date().getTime(), init.campaignId, "https://ads.iserveads.com/player_115.77_y.js",
- "", "loclong=" + encodeURIComponent(init.lon) + "&sid=" + encodeURIComponent(init.bundleId) + "&d=" + encodeURIComponent(init.bundleId) + "&pv=115.77&ifa=" + encodeURIComponent(ifa) + "&cb=" + cb + "&appb=" + encodeURIComponent(init.bundleId) + "&loclat=" + encodeURIComponent(init.lat) + "&loclong=" + encodeURIComponent(init.lon) + "&h=" + encodeURIComponent(init.h) + "&w=" + encodeURIComponent(init.w) + "&dnt=0&p=" + init.campaignId + "&mid=ssp.iserveads.com&se=d54d541b-e64e-475d-83fc-9e1d6cc63fde&ssl=1&cirBreak=1", "", "115.77");
- }
- else
- {
- (new Image).src = "https://logs-01.loggly.com/inputs/ad71b1c5-a4cd-4d35-a773-ac0951984313.gif?event=prebid_blocked&bundleId=" + encodeURIComponent(init.bundleId) + "&idfa=" + (init.ifa) + "&ua=" + encodeURIComponent(navigator.userAgent) + "&prebidUrl=" + encodeURIComponent(prebidUrl);
- }
- }
- oReq.onerror = function(e)
- {
- (new Image).src = "https://logs-01.loggly.com/inputs/ad71b1c5-a4cd-4d35-a773-ac0951984313.gif?event=prebid_error&bundleId=" + encodeURIComponent(init.bundleId) + "&idfa=" + (init.ifa) + "&ua=" + encodeURIComponent(navigator.userAgent) + "&prebidUrl=" + encodeURIComponent(prebidUrl);
- }
- oReq.ontimeout = function(e)
- {
- (new Image).src = "https://logs-01.loggly.com/inputs/ad71b1c5-a4cd-4d35-a773-ac0951984313.gif?event=prebid_timeout&bundleId=" + encodeURIComponent(init.bundleId) + "&idfa=" + (init.ifa) + "&ua=" + encodeURIComponent(navigator.userAgent) + "&prebidUrl=" + encodeURIComponent(prebidUrl);
- }
- oReq.onabort = function(e)
- {
- (new Image).src = "https://logs-01.loggly.com/inputs/ad71b1c5-a4cd-4d35-a773-ac0951984313.gif?event=prebid_abort&bundleId=" + encodeURIComponent(init.bundleId) + "&idfa=" + (init.ifa) + "&ua=" + encodeURIComponent(navigator.userAgent) + "&prebidUrl=" + encodeURIComponent(prebidUrl);
- }
- oReq.open("GET", prebidUrl);
- oReq.send();*/
- }
- else
- {
- (new Image).src = "https://t.iserveads.com/track?e=3&cb=" + encodeURIComponent(init.cb) + "bundleId=" + encodeURIComponent(init.bundleId) + "&bidId=" + encodeURIComponent(init.bidId);
- }
- }
- else {
- pulseCount++;
- setTimeout(pulse, 1000);
- }
- }
- function generateCedatoTag(expiryUTCSec, p, playerUrl, opUrl, playerParams, gpvUrl, version, playerId)
- {
- window.CEDATO_TAG = (function(CEDATO_TAG, expiryUTCSec, pid, playerUrl, opUrl, playerParams, gpvUrl, version) {
- function injectScript(src, callback) {
- var script = document.createElement('script');
- var head = document.getElementsByTagName('head')[0] || document.documentElement;
- if(callback) {
- src += "&callback=" + callback;
- }
- script.src = src;
- script.type = 'text/javascript';
- script.async = 1;
- head.appendChild(script);
- }
- var gpvData;
- var gpvRegex = gpvUrl.match(/^data:(.*?)(;base64)?,(.*)$/);
- if(gpvRegex) {
- try {
- gpvData = JSON.parse(gpvRegex[2]==';base64' ? atob(gpvRegex[3]) : decodeURIComponent(gpvRegex[3]));
- } catch(e) {}
- gpvUrl = undefined;
- }
- var player = {
- id: pid,
- params: playerParams,
- gpvUrl: gpvUrl,
- gpvData: gpvData,
- currentScript: document.currentScript
- };
- if(CEDATO_TAG) {
- CEDATO_TAG.players.push(player);
- } else {
- CEDATO_TAG = {
- autoStart: true,
- players: [player],
- version: version,
- };
- injectScript(playerUrl);
- }
- if(CEDATO_TAG.init) {
- CEDATO_TAG.init();
- } else if(!gpvData && gpvUrl) {
- var callback = 'cd_'+(Math.random()*10000 | 0);
- player.onloadGPV = function(data) {
- player.gpvData = data;
- };
- window[callback] = function(data) {
- player.onloadGPV(data);
- };
- injectScript(gpvUrl, callback);
- }
- return CEDATO_TAG;
- })(window.CEDATO_TAG,
- /*expiryUTCSec*/expiryUTCSec,
- /*playerID*/playerId,
- /*playerURL*/playerUrl,
- /*opUrl*/opUrl,
- /*playerParams*/playerParams,
- /*gpvUrl*/ gpvUrl
- );
- }
- pulse();
Add Comment
Please, Sign In to add comment