Vercel's built-in rewrite engine lets you forward specific URL paths on your deployment to a different upstream — without writing any server code. Two entries in vercel.json are all you need to proxy the Admaxxer pixel and event endpoint through your own domain.
yourdomain.com keeps requests off those lists.SameSite=Lax to flow freely, preserving session attribution.vercel.json in your repository root.Open (or create) vercel.json in your project root. Add a rewrites array:
{
"rewrites": [
{
"source": "/js/script.js",
"destination": "https://admaxxer.com/js/script.js"
},
{
"source": "/api/event/:path*",
"destination": "https://admaxxer.com/api/event/:path*"
}
]
}
If you already have a rewrites array, append both objects to it. The order matters — Vercel applies rewrites top to bottom; put the pixel entries before any catch-all rewrite you may have.
Commit the change and push. Vercel will redeploy automatically. The two paths are now live within seconds of the deployment completing.
git add vercel.json
git commit -m "proxy admaxxer pixel through own domain"
git push
In Admaxxer go to Connections › Install, enable Custom proxy domain, and enter your Vercel deployment domain (e.g. https://yourdomain.com). Save. The generated snippet will now reference yourdomain.com/js/script.js and yourdomain.com/api/event.
After deploying, verify the proxy works from the command line:
curl -I https://yourdomain.com/js/script.js
You should see HTTP/2 200 and content-type: application/javascript. Then fire a test event from your browser and confirm it appears in the Admaxxer Live Events tab.
If you are using Next.js, Nuxt, or another framework deployed on Vercel, the vercel.json rewrites approach still works, but there is a framework-native alternative that avoids shipping the config file. See the Next.js proxy guide for next.config.js rewrites, or the Nuxt guide for Nitro route rules.
vercel.json changes./js/script.js — Vercel rewrites are case-sensitive.admaxxer.com."source": "/(.*)" appears before the pixel entries, move the pixel entries above it.Remove the two objects from the rewrites array and redeploy. In Admaxxer, disable the custom proxy domain to revert the snippet. The change takes effect on the next deployment.
Cloudflare · Next.js · Nuxt · Netlify · WordPress · Apache · NGINX
See also: Connections › Install for the base snippet.