Skip to main content
To avoid ad-blockers from blocking the Dub Analytics script and its tracking requests, we recommend setting up a reverse proxy. Depending on which backend framework you’re using, there are a few different ways to do this:
Rewrites are matched in order, so keep the track rule before the catch-all. The catch-all also serves the files the script loads itself, like the identity variant’s agent.

Pointing the script at your proxy

Once you’ve set up your reverse proxy, load the script from your proxy and set the API host to your proxy URL.
Setting scriptProps.src stops the DubAnalytics component from picking the script variant for you, so point it at the variant you use, for example /_proxy/dub/script.conversion-tracking.identity.js.