@99devco/analytics - v3.1.0
    Preparing search index...
    • Resolves the current page URL in two forms:

      • actualUrl: the path detected from browser navigation (hash/history/pathname)
      • recordUrl: the path that should be persisted, allowing canonical/meta overrides

      The record URL is derived using this order of precedence:

      1. <meta name="99dev-page" />
      2. <link rel="canonical" />
      3. Fallback to the actual URL

      The actual URL honors the configured navigation type:

      • "hash": uses window.location.hash without the leading #
      • "history": prefers window.history.state.url when provided
      • "natural" (default): uses window.location.pathname

      When normalizeUrls is enabled the function removes query parameters, ensures a leading slash, trims trailing slashes, and drops .html extensions so both URLs share consistent formatting.

      Returns { actualUrl: string; recordUrl: string }

      An object containing { actualUrl, recordUrl }, both relative to the origin.

      const { actualUrl, recordUrl } = getURL();

      // Meta override
      // <meta name="99dev-page" content="https://example.com/about">
      // → actualUrl === "/"
      // → recordUrl === "/about"

      // Hash navigation
      // URL: https://example.com/#/products?page=2
      // → actualUrl === "/products"
      // → recordUrl === "/products"

      // History state override
      // history.pushState({ url: "/custom-path" }, "", "/products")
      // → actualUrl === "/custom-path"
      // → recordUrl === "/custom-path"