Skip to content

Proxy Setup

Ad blockers and privacy tools often block requests to known analytics and tracking domains. By routing usertrax through your own domain (first-party proxy), tracking requests look like regular traffic on your site.

Choose your setup

Pick your environment — we'll link you straight to the right guide.

Recommended guide

You need to proxy two endpoints:

Path on your domainProxies toPurpose
/cvs.jshttps://usertrax.io/cvs.jsTracking script
/api/usertrax/eventshttps://api.usertrax.io/api/eventsSession and conversion events

We recommend /api/usertrax/events instead of /api/events to avoid conflicts with your own API routes. You can use any path — just set the same value in usertraxConfig.endpoint.

After setting up the proxy, load the script from your domain and point events to your proxied endpoint:

<script>
window.usertraxConfig = {
endpoint: "/api/usertrax/events",
};
</script>
<script src="/cvs.js" data-key="YOUR_API_KEY" defer></script>

Keep data-key unchanged. The proxy must forward the X-Auth-Key header to api.usertrax.io.

  1. Visit your live website
  2. Open the browser Network tab
  3. Confirm cvs.js loads from your domain (not usertrax.io)
  4. Confirm POST requests go to /api/usertrax/events on your domain
  5. Check the usertrax dashboard for new sessions and conversions

Your proxy is not forwarding the X-Auth-Key header. Ensure the header is passed through to api.usertrax.io.

  • Avoid obvious paths like /tracking/ or /analytics/
  • Use neutral paths such as /cvs.js and /api/usertrax/events
  • If you use a Content Security Policy, allow script-src and connect-src for your own domain

Check that usertraxConfig.endpoint matches your proxied events path exactly (including leading slash).