Ad Blockers; a thorn in the side of every online business. Wouldn’t it be great if we could bypass those Ad Blockers and keep our Google Analytics data accurate?
That’s what Steve from Its420somewhere.com thought, when he contacted me with a well-researched feature request for CAOS Pro. A stealth mode to bypass (most) ad blockers. Today I’ll show you the base principles of bypassing Ad Blockers and protecting your Google Analytics data with CAOS Pro.
Why should I bypass ad blockers?
Before we dive into the how’s, the why might be a better place to start.
We can all agree that trustworthy analytics data is key for any online business. You, a business/blog owner, want to know your customer/visitor.
I respect the choice to use an ad blocker on the internet. I use it too. To protect my privacy, but more importantly, to protect my system. Advertisements are often injected with malware. That’s one of the reasons why I removed the advertisements on this site a few months ago. To protect you, my guest.
Then isn’t it a dangerous practice to bypass ad blockers? In case of advertisements and/or malware, yes. In case of Google Analytics, no. As long as it is used responsibly. This means:
- You still have to use a Cookie Notice, if you’re planning to collect data that can identify an individual within the EU, or
- configure Google Analytics to respect GDPR laws, or
- notify your visitor that you’re using cookies to collect data.
How does an Ad Blocker work?
Each ad blocker uses a different approach.
In earlier versions, CAOS already circumvented the easier ad blockers, since they’d only block files loaded from google-analytics.com. Hosting analytics.js locally resolved that.
Nowadays most ad blockers (including the tracking protection built into browsers) will simply block all requests made to blacklisted domains, such as google-analytics.com, while some extensions block files ‘intelligently’ — based on the content of a file.
We can work around the first approach with relative ease, while attempting to crack the latter means crossing some serious ethical boundaries.
How to Sneak your Data past Security
It’s starting to sound like I’m teaching you how to smuggle USB sticks across the border. You wish! But while we’re on the subject: peanutbutter.
Most ad blockers block all requests to blacklisted domains. This is exactly where its weakness lies. It can’t (and shouldn’t) block requests to the current domain, because that would cause some serious errors — rendering the ad blocker itself unusable.
Exploiting this weakness is best explained using this stunning illustration, made by yours truly — autographs after the show, please:
Usually, the webpage instructs the browser to make a request to google-analytics.com/collect?a=1&b=2&etc=etc. The ad blocker ‘sees’ this request and says: nuh-uh!
To bypass the Ad Blocker, we need to send Google Analytics’ data through the server hosting the website. We instruct the browser to make a request to yourdomain.com/collect?a=1&b=2&etc=etc and that request is proxied to Google Analytics’ Measurement API — through the backdoor, so to speak — where the ad blocker is not present.
Prevent Ad Blockers from Blocking Google Analytics Data with CAOS Pro
At this point, you must — you should, actually — be thinking: what an amazing idea — and an even more amazing person! How do I get my hands on this?
Well, If you’re already using CAOS, you might’ve noticed the new Stealth Mode Lite in the plugin’s settings.
Since version 4.2.0, Stealth Mode Lite has been removed from CAOS. The API simply wasn’t powerful enough to bypass ad blockers any longer. Read more about the changes here or upgrade to CAOS Pro to enable Super Stealth.
Since v2.7.0 CAOS is officially the only Google Analytics plugin for WordPress with Stealth Mode technology, allowing you to bypass ad blockers and browser built-in tracking protection, preserving your precious Google Analytics data.
Stealth Mode Lite bypasses some, less agressive and/or intelligent ad blockers. CAOS Pro intelligently bypasses all Ad Blockers.
But that’s not all, Stealth Mode Technology can be used in compatibility mode. This means that you can use it combined with Monster Insights, WooCommerce GA Integration and all other Google Analytics plugin supported by CAOS! Go ahead, get CAOS Pro now!
3 thoughts on “How to Bypass Ad Blockers with CAOS Pro for Google Analytics”
Great post. Keep up the good work!
Good morning, sorry for my sad English. first to tell you that your complement CAOS (Complete Analytics Optimization Suite) is very good I would like to ask if you can make it compatible for AMP For WP https://wordpress.org/plugins/accelerated-mobile-pages/ I would appreciate if you could complement the plugin for AMP. Thank you very much and sorry for the inconvenience. how can i donate can you inform me thank you