Back to articles
I built a reverse proxy to stop adblockers from eating my analytics

I built a reverse proxy to stop adblockers from eating my analytics

via Dev.to WebdevRaj Nandan Sharma

The problem nobody talks about You ship a product. You add Google Analytics. You add Amplitude. Maybe PostHog. You check your dashboard after a week and the numbers look off. Not slightly off. Way off. Turns out, 30-40% of your users run adblockers. And adblockers do not care if you are a billion-dollar ad company or a side project with 12 users. They block requests to known analytics domains. All of them. Your analytics SDK loads fine. It fires events fine. But those events never reach the server because the request to www.google-analytics.com gets killed before it leaves the browser. You are making decisions based on 60% of your data. That is not analytics. That is guessing. What I tried first I looked at existing solutions. Most of them fall into two camps. Camp one: paid services that proxy analytics for you. They work, but you are paying someone to run Nginx. That felt wrong. Camp two: custom server-side setups. Write your own proxy, handle headers, manage CORS, deal with path rew

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
7 views

Related Articles