Thursday, October 27, 2016

A Guide to Understanding Ad Blocked Traffic in Google Analytics

Ad Blocker software doesn't care about your terms and conditions, or how hard you work to create your content. In the process of blocking your ads, it messes up your Google Analytics tracking - and it leaves you guessing.
  • Are my ads not loading properly?
  • Are my ads underperforming?
  • How many of my visitors never actually see them?
  • Who's blocking my ads?
Just to make things clear, we'll say it again, we're not going to tell you how to do anything illegal. In fact, we're just going to utilize a smart code strategy. It's one that gives us a way to detect when ad blockers are being used. Let's ask Mr. Doyle why that's important:
"It is a capital mistake to theorize before one has data" - Arthur Conan Doyle
Uncloaking the Ad Blocker Data
Ad Blockers are definitely not as invisible as they might like to think. Of course, that's not really their primary goal anyway. We'll tell you, step by step, how to copy-paste a little piece of JavaScript code to better understand your ad blocking traffic.
We're going to give you detailed configuration instructions. We'll also explain how to understand your new Google Analytics data. So what's the end result?
  • You'll know what percentage of your visitors are using ad blockers
  • You'll be able to determine the impact it has on your Ad revenue
It's kind of a big deal. Ad blocking cost publishers an estimated $22 billion during 2015. Usage grew by 41% worldwide in the last year. Gulp.
First Things First - Your Prerequisites
To use this strategy, your site must have both Google Analytics and Google AdSense installed.
We use these as the key elements of the detection hack, which by the way is by courtesy of the great contributors at Webmaster World. They detect when AdSense isn't running as expected, which indicates that an ad blocker is in place. So that means ads from any network are most likely getting blocked too. All of your ads are gone... just like that.
FYI - For the purposes of our strategy, we're ignoring users who are disabling JavaScript entirely. This is a very small segment of your traffic. And they are very hard to track. They are likely highly techie/experienced users who are willing to accept a degraded presentation across the entire web.
Here's the TL;DR
You need this JavaScript snippet:
<script>
if(typeof adsbygoogle!== "undefined") {
window.addEventListener('load', function() {
if(typeof ga!== "undefined") {
if(typeof adsbygoogle.loaded === "undefined") {
ga('send', 'event', 'AdSense', 'Ads blocked', { "nonInteraction": 1 });
} else {
ga('send', 'event', 'AdSense', 'Ads not blocked', { "nonInteraction": 1 });
}
}
}, false);
}
</script>
If you want to track only "Ads blocked" events, you can use this modified version:
<script>
if(typeof adsbygoogle!== "undefined") {
window.addEventListener('load', function() {
if(typeof adsbygoogle.loaded === "undefined" && typeof ga!== "undefined") {
ga('send', 'event', 'AdSense', 'Ads blocked', { "nonInteraction": 1 });
}
}, false);
}
</script>
Now that you've pasted the above, let's go over to Google Analytics and get down to business:
  1. Create a Custom Segment
  2. Create New Segment for "Ads blocked"
  3. Configure new segment to grab data for the event created in the above JavaScript.
  4. Repeat for "Ads not blocked"
  5. Extra credit: Create a custom dimension
How to install the ad blocker tracking code
If you've installed snippets of code on your site before, you're good to go. If not, we really recommend you add a tag management system like Google Tag Manager. Otherwise, please contact your friendly neighborhood web developer for a quick code update.
Paste the code snippet just before the ending </body> tag of your site template. It needs to show up on every page. That's all you need for the code installation part.
Note: For this hack to work, your Google Analytics has to be Universal Analytics or the version containing "analytics.js."
What does the JavaScript code do?
This isn't a coding tutorial, so we won't bore you to death with any more technical complexity than needed. It's just a bit of really smart JavaScript. Here is what is happening step by step:
  1. Wait for the page to load, and then check to see if Google Analytics successfully loaded.
  2. If GA loaded JavaScript, then it is working, so check to see if your Google AdSense loaded too.
  3. Send some data to your Google Analytics account to indicate whether the ad was blocked or not.
If your pages load up and your Google Analytics is doing what it's supposed to do, you check your AdSense.
And if AdSense doesn't load? Then we can reasonably infer that it was prevented from loading by an ad blocker. Busted!
That's it. Some slick code using some smart logic to segment the users that are ad blocking and those who are not. Then it sends this information into Google Analytics for your to review.
A single line of code tells Google Analytics to store an event for us. That event tells us whether we detected the ad blocked or not. That's it.
http://www.sempopayan.gov.co/index.php?option=com_k2&view=itemlist&task=user&id=744503
http://czwlwz.chaozhou.gov.cn/JForum/user/profile/94124.page
http://app.gygov.gov.cn/bbs/user/profile/210361.page
http://torgi.gov.ru/forum/user/profile/289012.page
http://zakupki.gov.ru/forum/user/profile/1276186.page
http://forum.nerc.gov.ua/index.php?action=profile;area=summary;u=135666
http://krukiv-rada.gov.ua/user/asilchoc/
http://pinsk.gov.by/communication/forum/index.php?PAGE_NAME=profile_view&UID=7106
http://nc.gov.ua/communication/forum/?PAGE_NAME=profile_view&UID=746
http://rdbp.sea.gov.ua/help/index.php?action=profile;area=summary;u=40423
http://parlib.duma.gov.ru/ru/about/forum/view_profile.php?a&UID=4847
http://tracnghiem.thanhdoan.cantho.gov.vn/blog/index.php?userid=2020
http://discuss.fido.gov/viewprofile.aspx?UserID=58138
http://www.kzncomsafety.gov.za/UserProfile/tabid/255/userId/9756/Default.aspx
http://doanhung.phutho.gov.vn/UserProfile/tabid/61/userId/134580/Default.aspx
http://www.umuziwabantu.gov.za/UserProfile/tabid/43/userId/49714/Default.aspx
http://quangtri-ict.gov.vn/UserProfile/tabid/61/userId/247915/Default.aspx
http://thuvienso.khcnbackan.gov.vn/UserProfile/tabid/61/userId/4706/language/en-US/Default.aspx
http://browncounty-in.gov/ActivityFeed/tabid/60/UserId/2458/Default.aspx
http://sts.kzntl.gov.za/umhlabuyalingana/www/ActivityFeed/MyProfile/tabid/57/UserId/254271/Default.aspx

No comments:

Post a Comment