Skip to content

Bypass content blockers

Serve the tracker and event endpoint through first-party paths on the tracked site.

Proxy both collection paths through your site’s domain and give them application-specific names.

  1. Set matching custom paths in the Supermetry environment, then restart with plain supermetry.

    Terminal window
    export SUPERMETRY_TRACKER_PATH=/insights/client.js
    export SUPERMETRY_EVENT_PATH=/insights/collect
    supermetry

    Both values must start with /. Per-site scripts use the tracker path’s directory, for example /insights/YOUR_SITE_ID.js.

  2. Proxy that directory from the tracked site to Supermetry. For Caddy:

    example.com {
    handle /insights/* {
    reverse_proxy https://analytics.example.com
    }
    }
  3. Load the generated per-site script through the tracked domain.

    <script defer src="https://example.com/insights/YOUR_SITE_ID.js"></script>

The generated script derives the custom event path from its own origin, so events go to https://example.com/insights/collect through the same proxy.

What you should see: the script and event request both use example.com, and the visit appears in Realtime.