Background
⌘K

Proxy Setup Guide

Use your own domain for the pixel or embedded dashboard to improve accuracy and reduce losses from ad blockers and privacy tools.

Silvestro
Written by Silvestro
Updated more than a week ago

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

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.io for the pixel script
  • api.affonso.io for tracking requests
  • affonso.io for the embedded dashboard

With proxy setup, the browser uses your own domain instead.

Example:

  • customer.com/r/pixel.js
  • customer.com/r/track
  • customer.com/r/signups
  • customer.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 /r path 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.

Next Steps

Was this article helpful?

If you still need help, our support team is here for you.

Contact Support
bg

Ready to Scale Your SaaS?

Affonso is the easiest way to launch your own affiliate program. We take care of the technical stuff, so you can focus on growing your business.