PageSourceSearch

https://www.carinsurancecomparison.com/wp-content/plugins/leads-master/assets/js/session_tracking.js?ver=1.1.3

js carinsurancecomparison.com collected 2026-09-24 20:28:47 UTC 2,580 bytes, 83 lines download raw bytes

1jQuery(document).ready(function($) {
2  // check if new session
3  var sessionCookieName = 'quoteUserSession';
4  var sessionHasExperimentCookieName = 'quoteUserSessionHasExperiment';
5  var experimentId = findExperimentId();
6
7  // Removing default session cookie if an experiment ID is found
8   if(experimentId && !Cookies.get(sessionHasExperimentCookieName)){
9    Cookies.remove(sessionCookieName);
10    Cookies.set(sessionHasExperimentCookieName, true, { expires: 6/24 });
11   }
12
13  if (Cookies.get(sessionCookieName)) { return; }
14
15  Cookies.set(sessionCookieName, true, { expires: 6/24 });
16
17  function getHost(url) {
18    var host = null;
19    try {
20      var newUrl = new URL(url);
21      host = newUrl.host;
22    } catch (_e) {
23      // do nothing
24    }
25    return host;
26  }
27
28  var domain = window.location.host || getHost(window.location.href) || getHost(document.documentURI);
29  var content_type;
30  if(isKrakenPost()) content_type = 'kraken';
31
32  urlVars = getUrlVars();
33
34  // breadcrumbs to pixel
35  var breadCrumbText;
36  if (document.getElementsByClassName("aioseo-breadcrumbs").length === 0) {
37    breadCrumbText = undefined;
38  } else {
39    breadCrumbText = document.getElementsByClassName("aioseo-breadcrumbs")[0].innerText;
40  }
41
42  var pixelParams = {
43    domain: domain,
44    pagelevel: window.location.pathname,
45    visitor_id: getVisitorId(),
46    vertical: getVertical(),
47    traffic_type: (getPaidClickId() ? 'paid' : 'organic'),
48    source: document.referrer,
49    content_type: content_type,
50    utm_source: urlVars['utm_source'],
51    utm_medium: urlVars['utm_medium'],
52    utm_campaign: urlVars['utm_campaign'],
53    utm_term: urlVars['utm_term'],
54    utm_content: urlVars['utm_content'],
55    utm_adgroup: urlVars['utm_adgroup'],
56    query_string: window.location.search,
57    category: window.phoenix.config.pageCategory,
58    breadcrumbs: breadCrumbText,
59    experiment_id: experimentId,
60  }
61
62  // insert the pixel
63  var query = new URLSearchParams(removeEmpty(pixelParams));
64  var url = 'https://us-central1-analytics-236511.cloudfunctions.net/quoteGlobalSessionsPixel?' + query.toString();
65  var image = new Image();
66  image.src = url;
67  image.style = "display: none;";
68  document.body.appendChild(image);
69});
70
71/**
72 * Find the ExperimentId by checking the Hidden fields on all MDAs
73 * @returns First value fund
74 */
75
76function findExperimentId(){
77  var mdaExpField = $('form.mda-form input[name="experimentId"]');
78  for (var i = 0; i < mdaExpField.length; i++) {
79    var expId = $(mdaExpField[i]).val();
80    if (expId !== null && expId !== '') return expId;
81  }
82  return "";
83}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.