By default an analytics script loads from the provider's domain and sends events back there. Browsers, privacy tools and ad blockers recognise those addresses. A proxy puts a hop on your side in between: the browser asks your domain for the script, and your domain fetches it from the provider and passes it on. Events travel the same way in reverse.
Two ways to proxy
| DNS proxy (subdomain) | Server proxy (path) | |
|---|---|---|
| Address the browser sees | stats.example.com |
example.com/dt/script.js |
| What you change | One DNS record | Rewrite rules on a server or edge platform |
| Who runs the hop | The analytics provider | You |
| Needs code | No | A few lines of config |
What a proxy changes and what it doesn't
It changes the address. Scripts served from your own site are blocked far less often, and a Content Security Policy only needs 'self' when everything goes through your domain.
It does not change what is collected. The same script runs and sends the same data. Your privacy notice, legal basis and any consent you need stay the same.
Reveata's managed proxy
Pick an unused subdomain in Settings → General → Managed proxy, such as stats, and add the CNAME record Reveata shows at your DNS provider. Reveata checks the record, sets up HTTPS for the subdomain on its own and gives you a new snippet that loads from it (Managed proxy):
<script defer data-website-id="ws_your_tracking_id" src="https://stats.example.com/js/script.js"></script>DNS changes usually show within minutes. Reveata checks every 10 minutes for 3 days, then daily while you use it, and emails the owner if the record stops pointing to it for 3 days. On Cloudflare, set the record to DNS only (grey cloud), or Reveata cannot verify it. Avoid subdomain names like analytics or tracking, which some blockers look for.
Your own server as the proxy
Without a DNS record, you can pass two addresses through Next.js, Vercel, Netlify, Cloudflare Workers, Nginx, Caddy, Apache, Express, Laravel or WordPress: the script (GET) and the event endpoint (POST), then point the snippet at them with data-api (Proxy through your own server).
A server proxy has one extra job: telling Reveata the visitor's real IP address. Otherwise every visit looks as if it came from your server. Create a proxy secret (it starts with dt_proxy_), keep it in an environment variable, and send it in X-Reveata-Proxy-Secret with the visitor's address in X-Reveata-Client-IP. Only with a valid secret does Reveata use that address for location, IP exclusions, cookieless counting and rate limits. Pass on the browser's headers, never your cookies, and never cache the event path.
Pitfalls
- Losing the visitor's address. Without the proxy secret, locations and IP exclusions use your server's address.
- Dropping headers. A proxy that strips
User-Agent,Accept-Languageor fetch metadata makes real visits look scripted, and they are dropped as suspected bots. - Leaking secrets. The proxy secret belongs on the server only. Rotate it if it leaks.
- Crawler verification. Behind your own proxy without the secret, real crawlers can look spoofed because Reveata only sees your proxy's address.