Advertisement
d067ZBIl

Untitled

May 26th, 2022
730
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _airpr_ns = {}, _airpr_ns._airpr_ga_dim_preset = {
  2.     167298: "3",
  3.     853671: "3"
  4. }, _airpr_ns._airpr_ga_account_preset = {
  5.     167298: "UA-2467988-9",
  6.     853671: "UA-1384159-3"
  7. }, _airpr_ns._airpr_ga_type_preset = {
  8.     853671: "ca"
  9. }, _airpr_ns.airpr_id = function() {
  10.     return _airpr.hasOwnProperty("id") ? _airpr.id : _airpr
  11. }, _airpr_ns.ga_dim = function() {
  12.     return _airpr_ns._airpr_ga_dim_preset[_airpr_ns.airpr_id()] ? _airpr_ns._airpr_ga_dim_preset[_airpr_ns.airpr_id()] : _airpr.ga_dim
  13. }, _airpr_ns.ga_account_preset = function() {
  14.     return _airpr_ns._airpr_ga_account_preset[_airpr_ns.airpr_id()] ? _airpr_ns._airpr_ga_account_preset[_airpr_ns.airpr_id()] : _airpr.ga_account_preset
  15. }, _airpr_ns.ga_account_type_preset = function() {
  16.     return _airpr_ns._airpr_ga_type_preset[_airpr_ns.airpr_id()] ? _airpr_ns._airpr_ga_type_preset[_airpr_ns.airpr_id()] : "ua"
  17. }, _airpr_ns.preload = function() {
  18.     return _airpr.hasOwnProperty("preload") ? _airpr.preload : !0
  19. }, _airpr_ns.ca_cookie = function() {
  20.     return ca_cookie_helper = function(n) {
  21.         var i, i2, c = "-",
  22.             l = document.cookie;
  23.         return i = l.indexOf(n), i > -1 && (i2 = l.indexOf(";", i), 0 > i2 && (i2 = l.length), c = l.substring(i, i2)), c
  24.     }, ca_cookie_helper("__utma") + ";+" + ca_cookie_helper("__utmz") + ";"
  25. }, _airpr_ns.om_fallback_cookie = function() {
  26.     var s_object = _airpr_ns.om_object();
  27.     return "undefined" != typeof s_object ? s_object.vid || s_object.aid || s_object.mid || s_object.fid : void 0
  28. }, _airpr_ns.om_cookie = function(cookie_id) {
  29.     return cookie_id && (_airpr_ns.om_cookie_id = "undefined" != typeof cookie_id ? cookie_id.id : null, _airpr_ns.px()), _airpr_ns.om_cookie_id
  30. }, _airpr_ns.ga_account_info = function() {
  31.     var t, gaObject, trackers, ua_cookie, account_name, account = "UA-XXXXX-X",
  32.         preset_account = _airpr_ns.ga_account_preset(),
  33.         preset_account_type = _airpr_ns.ga_account_type_preset(),
  34.         parent_window = parent,
  35.         google_analytics_object = parent_window.GoogleAnalyticsObject;
  36.     if ("undefined" != typeof google_analytics_object && "undefined" != typeof parent_window[google_analytics_object] && "function" == typeof parent_window[google_analytics_object].getAll ? gaObject = parent_window[google_analytics_object] : "undefined" != typeof parent_window.ga && "function" == typeof parent_window.ga.getAll && (gaObject = parent_window.ga), "undefined" != typeof gaObject && "ua" === preset_account_type) {
  37.         trackers = gaObject.getAll();
  38.         for (t in trackers)
  39.             if (account = trackers[t].get("trackingId"), ua_cookie = trackers[t].get("clientId"), account_name = trackers[t].get("name"), preset_account) {
  40.                 if (account === preset_account) break
  41.             } else if ("UA-XXXXX-X" !== account) break;
  42.         var ga_dim = _airpr_ns.ga_dim();
  43.         if ("string" == typeof ga_dim) {
  44.             var data = {
  45.                 hitType: "event",
  46.                 eventCategory: "airpr",
  47.                 eventAction: "visitor hit",
  48.                 nonInteraction: !0
  49.             };
  50.             data["dimension" + ga_dim] = ua_cookie, gaObject(account_name + ".send", data)
  51.         }
  52.         return {
  53.             ga_account_id: account,
  54.             ga_account_type: "UA",
  55.             ga_c: ua_cookie
  56.         }
  57.     }
  58.     if ("undefined" != typeof parent_window._gat && "function" == typeof parent_window._gat._getTrackers) {
  59.         if (preset_account) account = preset_account;
  60.         else {
  61.             trackers = parent_window._gat._getTrackers();
  62.             for (t in trackers)
  63.                 if (account = trackers[t]._getAccount(), "UA-XXXXX-X" !== account) break
  64.         }
  65.         return {
  66.             ga_account_id: account,
  67.             ga_account_type: "CA",
  68.             ga_c: _airpr_ns.ca_cookie()
  69.         }
  70.     }
  71.     return null
  72. }, _airpr_ns.om_account_info = function() {
  73.     return _airpr_ns.has_om() ? {
  74.         om_account_type: "OM",
  75.         om_c: _airpr_ns.om_cookie(),
  76.         om_fallback_c: _airpr_ns.om_fallback_cookie()
  77.     } : null
  78. }, _airpr_ns.has_om = function() {
  79.     return !!_airpr_ns.om_tracking_server()
  80. }, _airpr_ns.om_object = function() {
  81.     var s_object, parent_window = parent;
  82.     return "undefined" != typeof parent_window.s && "string" == typeof parent_window.s.version ? s_object = parent_window.s : "undefined" != typeof parent_window.s_adobe && "string" == typeof parent_window.s_adobe.version ? s_object = parent_window.s_adobe : "undefined" != typeof parent_window.s_Obj && "string" == typeof parent_window.s_Obj.version ? s_object = parent_window.s_Obj : "undefined" != typeof parent_window.s_sm && "string" == typeof parent_window.s_sm.version ? s_object = parent_window.s_sm : "undefined" != typeof parent_window.sitecat && "string" == typeof parent_window.sitecat.version ? s_object = parent_window.sitecat : "undefined" != typeof parent_window.s_c_il && "undefined" != typeof parent_window.s_c_il[1] && "string" == typeof parent_window.s_c_il[1].version && (s_object = parent_window.s_c_il[1]), s_object
  83. }, _airpr_ns.om_tracking_server = function() {
  84.     var s_object = _airpr_ns.om_object();
  85.     if ("undefined" != typeof s_object) {
  86.         if ("string" == typeof s_object.trackingServer || "string" == typeof s_object.trackingServerSecure) return "https:" === document.location.protocol ? s_object.trackingServerSecure || s_object.trackingServer : s_object.trackingServer;
  87.         if ("string" == typeof s_object.account) return s_object.account + ".112.2o7.net"
  88.     }
  89. }, _airpr_ns.px = function() {
  90.     if ("undefined" != typeof _airpr) {
  91.         var pixel_url, serialize = function(obj) {
  92.                 var str = [];
  93.                 for (var p in obj) obj.hasOwnProperty(p) && str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
  94.                 return str.join("&")
  95.             },
  96.             merge_options = function(obj1, obj2) {
  97.                 var attrname, obj3 = {};
  98.                 for (attrname in obj1) obj3[attrname] = obj1[attrname];
  99.                 for (attrname in obj2) obj3[attrname] = obj2[attrname];
  100.                 return obj3
  101.             },
  102.             default_options = {
  103.                 hostname: document.location.hostname,
  104.                 profile: _airpr_ns.airpr_id()
  105.             },
  106.             query_string = serialize(merge_options(merge_options(default_options, _airpr_ns.ga_account_info()), _airpr_ns.om_account_info()));
  107.         pixel_url = "localhost" !== document.location.hostname ? "//dpx.airpr.com/px?" + query_string + "&an=true" : "http://localhost/px?" + query_string + "&an=true";
  108.         var i = new Image;
  109.         i.src = pixel_url
  110.     }
  111. }, _airpr_ns.initialize = function() {
  112.     try {
  113.         var script;
  114.         _airpr_ns.has_om() ? (script = document.createElement("script"), script.src = "//" + _airpr_ns.om_tracking_server() + "/id?callback=_airpr_ns.om_cookie", document.getElementsByTagName("head")[0].appendChild(script)) : _airpr_ns.px()
  115.     } catch (err) {}
  116. }, _airpr_ns.isFunction = function(f) {
  117.     try {
  118.         return /^\s*\bfunction\b/.test(f)
  119.     } catch (x) {
  120.         return !1
  121.     }
  122. }, _airpr_ns.register_event = function() {
  123.     function makeHandler(element, new_handler, old_handlers) {
  124.         var handler = function(event) {
  125.             if (event = event || fixEvent(window.event), !event) return void 0;
  126.             var old_result, new_result, ret = !0;
  127.             return _airpr_ns.isFunction(old_handlers) && (old_result = old_handlers(event)), new_result = new_handler.call(element, event), (!1 === old_result || !1 === new_result) && (ret = !1), ret
  128.         };
  129.         return handler
  130.     }
  131.  
  132.     function fixEvent(event) {
  133.         return event && (event.preventDefault = fixEvent.preventDefault, event.stopPropagation = fixEvent.stopPropagation), event
  134.     }
  135.     var register_event = function(element, type, handler, oldSchool) {
  136.         if (!element) return void console.error("No valid element provided to register_event");
  137.         if (element.addEventListener && !oldSchool) element.addEventListener(type, handler, !1);
  138.         else {
  139.             var ontype = "on" + type,
  140.                 old_handler = element[ontype];
  141.             element[ontype] = makeHandler(element, handler, old_handler)
  142.         }
  143.     };
  144.     return fixEvent.preventDefault = function() {
  145.         this.returnValue = !1
  146.     }, fixEvent.stopPropagation = function() {
  147.         this.cancelBubble = !0
  148.     }, register_event
  149. }(), _airpr_ns.load = function() {
  150.     function dom_loaded_handler() {
  151.         dom_loaded_handler.done || (dom_loaded_handler.done = !0, _airpr_ns.preload() && _airpr_ns.initialize())
  152.     }
  153.  
  154.     function do_scroll_check() {
  155.         try {
  156.             document.documentElement.doScroll("left")
  157.         } catch (e) {
  158.             return void setTimeout(do_scroll_check, 1)
  159.         }
  160.         dom_loaded_handler()
  161.     }
  162.     if (document.addEventListener) "complete" == document.readyState ? dom_loaded_handler() : document.addEventListener("DOMContentLoaded", dom_loaded_handler, !1);
  163.     else if (document.attachEvent) {
  164.         document.attachEvent("onreadystatechange", dom_loaded_handler);
  165.         var toplevel = !1;
  166.         try {
  167.             toplevel = null === window.frameElement
  168.         } catch (e) {}
  169.         document.documentElement.doScroll && toplevel && do_scroll_check()
  170.     }
  171.     _airpr_ns.register_event(window, "load", dom_loaded_handler, !0)
  172. }();
Advertisement
RAW Paste Data Copied
Advertisement