Beating ad blockers
Serve the tag from your own domain and stop losing a third of your traffic.
Somewhere between a quarter and a third of your visitors run an ad blocker. If your analytics script is served from a third-party host, most of them are never counted, and the traffic you do see is skewed towards the least technical part of your audience.
Why serving it yourself works
Blockers filter on domain and path, using community lists that enumerate known analytics hosts. A request to a third-party analytics domain is a trivial match. The same request served from your own domain is indistinguishable from any other first-party asset.
This is not a loophole. It is the standard approach used across privacy-first analytics, it needs no change to the tag, and it works entirely through routing at your edge.
How to set it up
Pick any unused path prefix on your domain and forward two routes through it:
| Your domain | Forwards to |
|---|---|
| example.com/stats/js/s.js | causalit.fr/js/s.js |
| example.com/stats/api/ev | causalit.fr/api/ev |
Then point the tag at your own prefix:
<script defer
data-domain="example.com"
data-api="/stats/api/ev"
src="/stats/js/s.js"></script>Two things your proxy must get right
- Forward the real client IP in X-Forwarded-For. We read it transiently to compute the daily fingerprint and the country, and never store it. Without it every visitor behind your proxy collapses into a single one.
- Strip the Cookie header. The ingest endpoint never reads cookies, so forwarding them would leak your own session cookies for no reason at all.