Same-origin proxy overview
Ad blockers and privacy extensions often block third-party analytics hosts. PureMetrix supports a same-origin proxy so the browser talks to your domain (for example /px/event) while your server, CDN or WordPress passes the data on to https://collect.puremetrix.org.
When to use a proxy
- You see missing pageviews for visitors who run uBlock or similar tools.
- You want all analytics requests to stay on your own domain (first-party).
- Your security team prefers one allowlisted collect path.
How PureMetrix expects it
- Serve the tracker from a path on your site that rewrites to
https://collect.puremetrix.org/js/…. - POST events to a same-origin path that rewrites to
https://collect.puremetrix.org/api/event. - Forward
X-Forwarded-For(or equivalent) so PureMetrix can apply bot filtering and location lookup correctly.
WordPress users finish the setup wizard first, then enable the built-in proxy under Settings → PureMetrix. Other stacks use templates under our adapters/proxy/ folder.
Verify
- Open your site while logged out, then open DevTools → Network.
- Confirm the script loads from your origin (not a blocked third-party name).
- Confirm an event request returns 202/204 and a pageview appears in https://app.puremetrix.org within a minute.