DEV Community


Posted on

Are Ad Blockers blocking Google Analytics?

Blog Stats Discrepancy (Feb 2020)

  • Google Analytics shows I had 70.7k total users including direct, organic, referrals, and social.

  • Google Search Console displays I had 81.7K organic clicks only in the month of February.

Now, I am wondering what went wrong with GA tracking. Are Ad Blockers the real culprit?

Does anyone know how to bypass Ad Blockers?

Top comments (7)

irreverentmike profile image
Mike Bifulco

So -- yes, ad blockers do tend to block Google Analytics. As I understand it, there's a couple different approaches you might use to address this:

  1. Do nothing. Some of your analytics will be lost due to this kind of attrition, but you'll be honoring the preferences of your users, essentially.
  2. Ask your users to whitelist your site from adblock
  3. Supplement your GA with another analytics tool, so that you can compare numbers.
  4. Re-host and proxy google analytics, as outlines in this blog post
  5. Use Fathom for analytics, which you can self-host via their OSS release, or use their paid service.
attacomsian profile image

Thank you for your answer. I appreciate it 🙌

Since I am also a developer and regularly use different privacy tools, I would go with the first option and won't do anything.

GA tracking is not as important as the privacy of the users. I asked the question out of curiosity to understand what actually happened.

triloworld profile image
Patryk Padus

Lazy adding script or use Google Tag Manager? Me too. Solution: server side analytics send to Google. Just be sure that you honor user who block ads - you, mine and other choice. You can just count people and get how many people have adblock

andrewmcodes profile image
Andrew Mason

Short answer is yes. Longer is It depends which one they are using and how cranked up they have the settings and a host of other factors. I have mine set to block GA.

Why are these analytics so important that you are willing to try and violate the privacy of your users? That’s pretty unethical and actually punishable under the CCPA. I suggest taking a look at this law and it’s connection with GA bc it may also help answer some questions about the disparity.

attacomsian profile image

Hi Andrew, thank you for the feedback.

Not really interested to do anything that violates privacy laws. I asked this question because I was curious to know what actually happened with the GA tracking.

zitros profile image
Nikita Savchenko • Edited

There's which allows you to solve this problem with ad blockers, as well as any sort of content blocking software, but only terms of analytics (Google Analytics, Google Tag Manager, Facebook Pixel, etc) - it doesn't work with ads.

Regarding privacy and ethics: for sure DataUnlocker is just a tool which will fix your reporting accuracy (an equivalent to as if you implement server-side analytics, but without putting much effort to it). All privacy implications are still on your side. But I think by correctly implementing that widespread "we use cookies" consent one can solve any privacy concerns.

tobiassn profile image
Tobias SN

I think it’s more likely that some people just clicked more than once. To my knowledge, ad blockers only block trackers that aren’t connected to ads (So not Google Analytics).

Some comments may only be visible to logged-in visitors. Sign in to view all comments.