Log ad-block visitors with reverse proxy tracking!


Slow, annoying ads are the top reason I’ve used ad-blockers for literal decades now. Many users care about the tracking/privacy aspect as well. I personally don’t mind being tracked online, but I’m slightly biased.

Analytics used to slow down websites too, so ad-blockers block those services as well. Today, ads are still slow and annoying, but thanks to modern browser tech, analytics is almost completely unnoticeable. Many analytics services these days are also privacy-friendly by default — including Clicky, when we joined the bandwagon in March 2022.

Unfortunately, ad-blockers are stuck in the past and continue blocking all trackers by default. Some have an option to allow “friendly” ads. Hopefully one day they will add an option for friendly trackers too.

But as they’ve gained in popularity, ad-blockers have left a bigger and bigger blindspot in the reporting systems that most website owners use. As that’s happened, more and more customers are asking us why specific visitors aren’t showing up when the customers know for a fact that the visitor went to their site. Even after I’ve verified everything is set up and working correctly by showing them my own visit to their site in our own reporting system… many are simply unsatisfied with the overall situation.

Finally, there is a solution! With our new reverse proxy tracking, the tracking code and all tracking beacons will route through generic pathnames on your website’s domain name, instead of ours. This makes tracking much harder to detect, and will only be blocked by visitors who set up a manual override for your site. When we switched to this method for tracking clicky.com, our numbers increased by almost 20%. What a difference!

proxy vs normal code

To get started, go to the tracking code page for any of your websites. Below the normal code is a form to generate your anti-adblock code, using five different methods/servers: Nginx, Caddy, Apache, htaccess, and PHP.

It’s a bit more involved than standard tracking set up, but it’s really just matter of getting the code into the right place, and it’s absolutely worth it if you have the means.

There’s only one other analytics service we know of that has even a general guide on how to set up proxy tracking, and other services may in theory support a similar set up. The Clicky difference is that our guides are fully dynamic, and generate the code for your specific site, rather than just giving you a template and having you figure out how to make it work for your site.

This, along with IPv6 support, have been amongst our most requested features for several years now. So we are very excited that they are now both available as of this month!


  1. Very cool, congrats on the scalable solution! With the PHP version, any negative impact on speed/load times compared to the current version?

    • All the methods add an extra network hop between the visitor and our tracking servers, so there is a slight performance penalty there. On the flipside, proxying removes two DNS lookups that the visitor’s browser would need to perform, at least for their first page view. So overall it’s probably faster no matter what, especially if your site has HTTP/2 or HTTP/3 support.

      PHP would only be slower than the other methods if the PHP scripts were also behind a reverse proxy on your end, as 3/4 of the other methods you can set up on your theoretical reverse proxy. But otherwise, all of the methods should be about the same performance.

  2. This is great, but I’m finding most visitors in my logs are now ‘Cloudflare’
    Is there a way I can pass Clicky the forwarded IP address to use in its tracking?

  3. Sorry, I now see it’s right there in the comments of the provided Nginx config – I replaced $remote_addr with $proxy_add_x_forwarded_for and it’s all working well now!

Comments are closed.