Proxy Setup Guide
We recommend proxying Affonso through your own domain for every program.
The hosted setup works without a proxy, so it is not required. A first-party proxy is still the recommended production setup because ad blockers and privacy tools can block third-party scripts and requests before Affonso can record them.
With proxy setup, the browser loads Affonso from your domain instead of Affonso-hosted domains. This usually makes tracking and embedded dashboards more reliable.
Important for Tracking
If you proxy /track or /signups, Affonso must still receive a trusted real
client IP header such as CF-Connecting-IP, True-Client-IP, or X-Real-IP.
Otherwise attribution can still work while country analytics are wrong or missing.
What You Should Set Up
- Every program: set up the pixel proxy.
- Programs with an embedded dashboard: set up both the pixel proxy and the embedded dashboard proxy.
Use /r as the default prefix in both guides. It keeps every Affonso request
under one short, predictable path on your domain.
What Changes
Without a proxy, the browser talks directly to:
cdn.affonso.iofor the pixel scriptapi.affonso.iofor tracking requestsaffonso.iofor the embedded dashboard
With proxy setup, the browser uses your own domain instead.
Example:
customer.com/r/pixel.jscustomer.com/r/trackcustomer.com/r/signupscustomer.com/r/embed/...
Keep the route suffixes as documented in the guides below. You can change /r
later if that path conflicts with your application.
Before You Start
Make sure you have:
- a domain you control
- Cloudflare, Vercel, NGINX, or another reverse-proxy layer on that domain
- the
/rpath prefix reserved for Affonso - a way to preserve the real visitor IP on proxied tracking requests
If you use Cloudflare, start with the short Worker instructions in the guides below. Vercel and NGINX alternatives are available in the advanced sections.


