PageSourceSearch

https://app.genderapi.io/scripts/analytics.js

js genderapi.io collected 2026-10-03 20:40:43 UTC 2,895 bytes, 59 lines download raw bytes

1(() => {
2  "use strict";
3  const measurementId = "G-KQEGWXZKND";
4  const cookie = name => document.cookie.split(";").map(v => v.trim()).find(v => v.startsWith(name + "="))?.slice(name.length + 1);
5  const allowed = () => location.origin === "https://app.genderapi.io" && cookie("genderapi_analytics_consent") === "accepted";
6  const safePaths = new Set(["/", "/csv", "/buy", "/buy2", "/invoices", "/profile", "/user/register", "/user/activate", "/user/login", "/user/forgotPassword", "/user/resetPassword", "/permissions", "/freeCreditsDetails", "/freeCredits", "/integrations"]);
7  const safeLocation = () => location.origin + (safePaths.has(location.pathname) ? location.pathname : "/");
8  window.dataLayer = window.dataLayer || [];
9  window.gtag = window.gtag || function () { window.dataLayer.push(arguments); };
10  window.gtag("consent", "default", {
11    analytics_storage: "denied", ad_storage: "denied", ad_user_data: "denied", ad_personalization: "denied",
12  });
13  window["ga-disable-" + measurementId] = !allowed();
14  let initialized = false;
15  let signupSent = false;
16  const initialize = () => {
17    if (initialized || !allowed()) return;
18    initialized = true;
19    window["ga-disable-" + measurementId] = false;
20    window.gtag("consent", "update", { analytics_storage: "granted" });
21    window.gtag("js", new Date());
22    window.gtag("config", measurementId, {
23      page_location: safeLocation(), page_referrer: "",
24      allow_google_signals: false, allow_ad_personalization_signals: false,
25      cookie_flags: "SameSite=Lax;Secure",
26    });
27    const script = document.createElement("script");
28    script.async = true;
29    script.src = "https://www.googletagmanager.com/gtag/js?id=" + measurementId;
30    document.head.appendChild(script);
31  };
32  const recordSignup = method => {
33    if (!allowed() || signupSent || !["password", "google"].includes(method)) return;
34    initialize();
35    signupSent = true;
36    window.gtag("event", "sign_up", {
37      send_to: measurementId, method, site: "genderapi.io", content_language: "en",
38      page_location: safeLocation(), page_referrer: "",
39    });
40  };
41  window.genderapiAnalytics = { recordSignup };
42  initialize();
43  // Set only by the new-account branch of the Google callback, never by login.
44  // The authoritative funnel signup is recorded by that server branch separately.
45  if (cookie("genderapi_signup") === "google") {
46    document.cookie = "genderapi_signup=; Max-Age=0; Path=/; Domain=.genderapi.io; SameSite=Lax; Secure";
47    recordSignup("google");
48  }
49  window.addEventListener("focus", () => {
50    if (!allowed()) {
51      window["ga-disable-" + measurementId] = true;
52      window.gtag("consent", "update", { analytics_storage: "denied" });
53    } else {
54      window["ga-disable-" + measurementId] = false;
55      window.gtag("consent", "update", { analytics_storage: "granted" });
56      initialize();
57    }
58  });
59})();

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.