PageSourceSearch

https://nudelive.com/js/nl-track.js

js nudelive.com collected 2026-09-28 06:55:57 UTC 2,901 bytes, 54 lines download raw bytes

1/* NudeLive first-party tracking snippet — goes on the MAIN SITE (nudelive.com) pages.
2   Feeds the stats warehouse's click ledger + funnel beacons at https://pb.nudelive.com/b.
3   ~1.4 KB, no dependencies, no third parties. Honest-data rules: first-party only, THIS DEVICE ONLY. */
4(function () {
5  var NL_BRAND = (document.currentScript && document.currentScript.dataset && document.currentScript.dataset.brand) || 'nudelive';
6  var EP = 'https://pb.nudelive.com/b';
7  var K = 'nl_cid';
8  function cid() {
9    try {
10      var c = localStorage.getItem(K);
11      if (!c) { c = Date.now().toString(36) + Math.random().toString(36).slice(2, 10); localStorage.setItem(K, c); }
12      return c;
13    } catch (e) { return 'nols' + Date.now().toString(36); }
14  }
15  function send(data) {
16    data.cid = cid(); data.p = location.pathname; data.brand = NL_BRAND;
17    var body = JSON.stringify(data);
18    if (navigator.sendBeacon) navigator.sendBeacon(EP, new Blob([body], { type: 'text/plain' }));
19    else { var x = new XMLHttpRequest(); x.open('POST', EP, true); x.send(body); }
20  }
21  var q = new URLSearchParams(location.search);
22  var landed = sessionStorage.getItem('nl_landed');
23  if (!landed) {
24    sessionStorage.setItem('nl_landed', '1');
25    send({ e: 'land', ref: document.referrer, gclid: q.get('gclid') || '', via: q.get('via') || '',
26      utm_source: q.get('utm_source') || '', utm_medium: q.get('utm_medium') || '',
27      utm_campaign: q.get('utm_campaign') || '', utm_term: q.get('utm_term') || '',
28      utm_content: q.get('utm_content') || '', vsrc: q.get('vsrc') || '', lang: navigator.language || '' });
29  }
30  if (location.pathname.indexOf('/cam/') === 0) send({ e: 'pf' });
31  /* real-user page speed: one perf beacon per pageview (load event end) */
32  window.addEventListener('load', function () {
33    setTimeout(function () {
34      try {
35        var nav = performance.getEntriesByType('navigation')[0];
36        var ms = nav ? Math.round(nav.loadEventEnd) : Math.round(performance.now());
37        if (ms > 0) send({ e: 'perf', ms: ms });
38      } catch (e) {}
39    }, 0);
40  });
41  window.NLTRACK = { gate: function () { send({ e: 'gate' }); }, ev: send };
42  /* Connect / affiliate exits: log the exit and carry nl_cid as sid — this joins postback
43     conversions back to the landing page / channel / gclid that produced them */
44  document.addEventListener('click', function (ev) {
45    var a = ev.target.closest && ev.target.closest('a[href*="cams.nudelive.com/in/"],a[href*="cams.nudelive.com/auth/"]');
46    if (!a) return;
47    try {
48      var u = new URL(a.href);
49      if (!u.searchParams.get('sid')) { u.searchParams.set('sid', cid()); a.href = u.toString(); }
50      send({ e: 'exit', track: u.searchParams.get('track') || '', u: u.searchParams.get('b') || '' });
51    } catch (e) {}
52  }, true);
53  /* In the age gate handler, call NLTRACK.gate() after "I'm Over 18 — Enter". */
54})();

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.