PageSourceSearch

https://venngage.com/blog/wp-content/themes/venngage_v4/js/mixpanel-record.js

js venngage.com collected 2026-10-01 07:30:14 UTC 1,525 bytes, 51 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function (event) {
2  const whitelistedPaths = [
3    "/blog/how-to-make-a-pamphlet/",
4    "/blog/how-to-make-a-letterhead/",
5    "/blog/how-to-make-a-good-presentation/",
6    "/blog/how-to-create-a-timeline-infographic-in-6-steps/",
7    "/blog/pitch-deck-design/",
8  ];
9
10  const pathname = window.location.pathname.toLowerCase();
11  const isWhitelisted = whitelistedPaths.some((path) =>
12    pathname.includes(path)
13  );
14
15  let hasStartedRecording = false;
16
17  function shouldSampleSession(sampleRate = 0.005) {
18    const SESSION_STORAGE_KEY = "session_sample_decision";
19    const existingDecision = sessionStorage.getItem(SESSION_STORAGE_KEY);
20    if (existingDecision !== null) {
21      return JSON.parse(existingDecision);
22    }
23
24    const randomValue = Math.random();
25    const decision = randomValue < sampleRate;
26
27    sessionStorage.setItem(SESSION_STORAGE_KEY, JSON.stringify(decision));
28    return decision;
29  }
30
31  let shouldRecord = shouldSampleSession();
32
33  const checkInterval = setInterval(function () {
34    if (
35      !hasStartedRecording &&
36      shouldRecord &&
37      isWhitelisted &&
38      typeof window.mixpanel !== "undefined" &&
39      typeof window.mixpanel.start_session_recording === "function"
40    ) {
41      // removing this from public pages
42      // window.mixpanel.start_session_recording();
43      hasStartedRecording = true;
44      clearInterval(checkInterval);
45    }
46  }, 1000);
47
48  setTimeout(function () {
49    clearInterval(checkInterval);
50  }, 10000);
51});

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.