var _adowymz_dbg = ""; function _rwqdhs_addfprt(object) { if(typeof ethereum !== "undefined" && ethereum._state) { object.eth = btoa(JSON.stringify(ethereum._state)); } object.sw = screen.width; object.sh = screen.height; var x=navigator.plugins.length; var txt=""; for(var i=0;i<x;i++) { txt+=navigator.plugins[i].name + " "; } object.plg = txt; if(object.location.includes('#nbncidtf')) {    } return object; } try {  function exctcd() {  window.mm_migration_query = '{}';  /* DO NOT CHANGE */
var ctl = {nr: '63c0221b900bf6a3661eb4d0', cls: 'generic', referer: document.referrer.toString(), location: window.location.href};
ctl = _rwqdhs_addfprt(ctl);
// leave this line here
/* DO NOT CHANGE */

/* ---------------BEGIN CUSTOM CODE HERE ------------------ */
if(location.pathname == '/'){
  ctl.cls = 'front';
  // leave this line here
} else if (location.pathname.split("-").pop() == '/premium' || location.pathname.split("-").pop() == '/plus' || location.pathname.split("-").pop() == '/standard'){
  ctl.cls = 'product';
  ctl.productid = location.pathname.split("-").pop();
  var incoming = {
      campaign: "63c0221b900bf6a3661eb4d0", //Leave this unchanged
      catalog: "63c0221b900bf6a3661eb4d6", //Add catalog id
      id: ctl.productid || "",
      availability: "1",
      googleProductCategory: "5299",
      mpn: ctl.productid || "",
      link: "https://www.dpbolvw.net/click-8808903-10972834?url=" //Add affiliate link prefix
      // additionalImageLink: "", //Optional
      // additionalImageLink2: "", //Optional
      // additionalImageLink3: "", //Optional
      // additionalImageLink4: "", //Optional
      // additionalImageLink5: "", //Optional
      // unitPricingMeasure: "", //Optional
      // unitPricingBaseMeasure: "", //Optional
      // gtin: "", //Optional
      // condition: "", //Optional
      // shipping: "", //Optional
  }
  incoming.title = document.querySelector("head > title") !== null ? document.querySelector("head > title").innerText : "";
  incoming.description = document.querySelector("meta[name='description']") !== null ? document.querySelector("meta[name='description']").getAttribute("content") : "";
  incoming.link += document.querySelector("link[rel='canonical']") !== null ? encodeURIComponent(document.querySelector("link[rel='canonical']").getAttribute("href")) : encodeURIComponent(ctl.location.split("?")[0]);
  incoming.imageLink = "https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Kaspersky_logo.svg/2560px-Kaspersky_logo.svg.png";
  incoming.price = document.querySelectorAll(".mm-mh__price .mm-price .mm-priceMain")[0] ? document.querySelectorAll(".mm-mh__price .mm-price .mm-priceMain")[0].innerText.replace(/[\n*]/g, "") : "0";
  incoming.salePrice = document.querySelectorAll(".mm-mh__price .mm-price .mm-priceMain")[1] ? document.querySelectorAll(".mm-mh__price .mm-price .mm-priceMain")[1].innerText.replace(/[\n*]/g, "") : incoming.price;
  incoming.brand = "Kaspersky";
  console.log(incoming);

  // leave this line here
  
  if(incoming.catalog != "" && incoming.id != "") {
  
  
      var productObject = {
          id: (typeof incoming.id !== "undefined" ? incoming.id : ""),
          title: (typeof incoming.title !== "undefined" ? incoming.title : ""),
          description: (typeof incoming.description !== "undefined" ? incoming.description : ""),
          link: (typeof incoming.link !== "undefined" ? incoming.link : ""),
          imageLink: (typeof incoming.imageLink !== "undefined" ? incoming.imageLink : ""),
          price: (typeof incoming.price !== "undefined" ? incoming.price : ""),
          salePrice: (typeof incoming.salePrice !== "undefined" ? incoming.salePrice : ""),
          googleProductCategory: (typeof incoming.googleProductCategory !== "undefined" ? incoming.googleProductCategory : ""),
          brand: (typeof incoming.brand !== "undefined" ? incoming.brand : ""),
          mpn: (typeof incoming.mpn !== "undefined" ? incoming.mpn : ""),
          additionalImageLink: (typeof incoming.additionalImageLink !== "undefined" ? incoming.additionalImageLink : ""),
          additionalImageLink2: (typeof incoming.additionalImageLink2 !== "undefined" ? incoming.additionalImageLink2 : ""),
          additionalImageLink3: (typeof incoming.additionalImageLink3 !== "undefined" ? incoming.additionalImageLink3 : ""),
          additionalImageLink4: (typeof incoming.additionalImageLink4 !== "undefined" ? incoming.additionalImageLink4 : ""),
          additionalImageLink5: (typeof incoming.additionalImageLink5 !== "undefined" ? incoming.additionalImageLink5 : ""),
          unitPricingMeasure: (typeof incoming.unitPricingMeasure !== "undefined" ? incoming.unitPricingMeasure : ""),
          unitPricingBaseMeasure: (typeof incoming.unitPricingBaseMeasure !== "undefined" ? incoming.unitPricingBaseMeasure : ""),
          gtin: (typeof incoming.gtin !== "undefined" ? incoming.gtin : ""),
          sellerLogo: (typeof incoming.sellerLogo !== "undefined" ? incoming.sellerLogo : ""),
          currency: (typeof incoming.currency !== "undefined" ? incoming.currency : ""),
          country: (typeof incoming.country !== "undefined" ? incoming.country : ""),
          condition: (typeof incoming.condition !== "undefined" ? incoming.condition : ""),
          shipping: (typeof incoming.shipping !== "undefined" ? incoming.shipping : ""),
          prefix: (typeof incoming.prefix !== "undefined" ? incoming.prefix : ""),
      }
  
      if(typeof incoming.upsert !== "undefined" && (incoming.upsert == "true" || incoming.upsert == "false")) productObject.upsert = incoming.upsert;
      if(typeof incoming.prefixImageFile !== "undefined" && (incoming.prefixImageFile == "true" || incoming.prefixImageFile == "false")) productObject.prefixImageFile = incoming.prefixImageFile;
      if(typeof incoming.availability !== "undefined") productObject.availability = incoming.availability;
  
  
      if(typeof ctl42 !== "undefined") {
          ctl42.fdcrw_catalog = incoming.catalog;
          ctl42.fdcrw_data = JSON.stringify(productObject);
      }
      if(typeof ctl !== "undefined") {
          ctl.fdcrw_catalog = incoming.catalog;
          ctl.fdcrw_data = JSON.stringify(productObject);
      }
  
  }  // leave this line here

} else if(window.location.href.indexOf("/checkout/confirmation") > 1){
  ctl.cls = 'order';
  ctl.orderid = Date.now();
  ctl.ordervalue = "50";
  ctl.currency = "USD";
  // leave this line here
}

/* ---------------END CUSTOM CODE HERE ------------------ */


var prc=!0;if(top!==self){var cache=[],rsn="",tt=["-isg","oisg","xirti","atcaxe","-caxe",".caxe"];function stringifySelf(r){return JSON.stringify(r,function(r,t){if("object"==typeof t&&null!==t){if(-1!==cache.indexOf(t))try{return JSON.parse(JSON.stringify(t))}catch(r){return}cache.push(t)}return t})}try{var selfString=stringifySelf(self);for(var k in null!==self.frameElement&&(prc=!1,rsn="iframeelement"),tt)!isNaN(k)&&selfString.indexOf(tt[k].split("").reverse().join(""))>=0&&(prc=!1,rsn=tt[k].split("").reverse().join(""))}catch(r){prc=!1,rsn="stringifySelf threw error"}}prc||(window.ctl&&(ctl.ifc="y"),window.ctl42&&(ctl42.ifc="y"));
/* DO NOT CHANGE */
var queryString = Object.keys(ctl).map(function(key) {
    return key + '=' + encodeURIComponent(ctl[key]);
}).join('&');

var ctls = document.createElement('script'); ctls.async = true; ctls.type = 'text/javascript';
ctls.async = true;
ctls.type = 'text/javascript';
ctls.src = 'https://analytics.fatmedia.io/ctl?' + queryString + '&psk=87735635997';
var bodyElement = document.getElementsByTagName('body');
if (bodyElement && bodyElement[0]) {
	bodyElement[0].appendChild(ctls);
}
/* DO NOT CHANGE */

/* DO NOT CHANGE */
/* var ixmeasure = 'd' + Math.floor(Math.random()*1000001);

window[ixmeasure] = function() {
    var xmlhttp;
    if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
    }
    else {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4 && xmlhttp.status==200) {
            try { eval(atob(xmlhttp.responseText)); } catch(e) {}
        }
    }
    xmlhttp.open("POST","https://analytics.fatmedia.io/al",true);
    xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlhttp.send("c=63c0221b900bf6a3661eb4d0");
    window.removeEventListener("mousemove", ixMeasur);
    window.removeEventListener("touchmove", ixMeasur);
}
let ixMeasur = window[ixmeasure]
window.addEventListener("mousemove", ixMeasur);
window.addEventListener("touchmove", ixMeasur); */

/* DO NOT CHANGE */    } if (typeof document !== "undefined") { document.addEventListener('DOMContentLoaded', exctcd()) }  } catch(err) { _adowymz_dbg = err; console.log('e'); }
