Category Archives: Google Analytics

Customer Match – target email users using Google AdWords

In this blog post, we will describe important tips related to the initial set up of email lists in AdWords remarketing. Also, we will show initial results of Customer Match campaign for one of our clients, and the opportunities provided by such targeting.

 

Customer Match allows you to use a list of email addresses in the remarketing list.

Examples of email addresses collecting:
• collected email addresses from a customer who purchased products from your website
• collected email addresses from a customer  who registered on the website, applications or newsletters
• collected email addresses from a customer  who registered for the loyalty program, on the website or in physical stores.

Tip: try differentiating the list in a similar way as a way in which you have collected email addresses (website, newsletters, applications, brick & mortar) – that is, if you have a sufficient number of individual emails in each list. In future, if needed, you can target them differently.

 

The procedure of setting up a customer email list are detailed described on Google Support, so, we will keep on real examples and important facts.

All email list should be stored in a CSV format. It is important to check all email addresses for empty space(s) before or after, uppercase, and such. Google recognizes the difference between uppercase/lowercase letters and empty space (such mistakes often happens when users are using mobile phones). After checking and fixing email addresses, you are increasing the possibility of accepted email addresses. Since we reviewed all of our email addresses (for empty spaces, case sensitive, and obvious mistakes in writing), as picture shows, the format of email addresses was accepted 100%.

After checking our email lists in CSV was accepted 100% format of emails

From this customer match (email) list, Google is using only emails of users who are also logged into the Google Account (with that same email). That does not mean that these emails are exclusive to Gmail domain. However, in our experience, about 90% of accepted emails in the list are Gmails.

 

In our example, we used about 24,000 emails, of which Google accepted (found matching) for nearly 16,000 emails. It is 66% of all available emails.

You need at least 1,000 approved emails in one list to create the campaign, but we recommend a list of at least 10,000 approved emails. Google can serve ads on Google Search, Gmail or Youtube, only to users who are logged in Google account. Otherwise, a campaign might generate a very small number of ad impressions and clicks.

Of course, do not forget to exclude customer lists in all regular campaigns that contain the same target (keywords, Gmail, Youtube) to prevent double targeting.

 

Results of the Customer Match campaigns

The results are related to the period of 8 days, with 20,300 approved emails. We created seven search campaigns and one GSP campaign. Campaigns are created with the same settings and targeting as well as “regular” campaign.

 

Results of the Results of Customer Match campaigns

 

Campaigns achieved 459 clicks with average CTR of 17.61%, which is 40.51% improvement in CTR compared to the regular campaigns.

It is also important to note that 50.88% impressions and 68.63% clicks are coming from mobile devices. In comparison with the regular campaign, a percentage of impressions on mobile devices is 36.67% and 46.33% clicks.

Since users generally stay logged in to their Google account on their mobile devices, these results are not surprising. Therefore, it is important to have a well-optimized mobile web page, and, of course, a sufficient number of accepted emails.

 

User behavior from Analytics account

 

According to the data about user behavior from Analytics account, it can be seen that the bounce rate of 28.91% is very low, with 8.10 average number of pages per session. Compared to the regular campaign, bounce rate decreased by 22.8%, while the average number of pages per session increased by 9.65%.

 

Customer Match campaigns in comparison to regular campaigns

 

In this period, Customer match campaigns generated an 117% higher ROAS (return on ad spend), although it achieved a significantly lower nominal number of transactions.

Through GSP campaign, you can reach a larger volume of impressions compared to the search campaigns. Considering that users need to log in to their Google account to see their Gmail account, GSP campaign is showing higher impressions of ads. Therefore, we recommend (in the case of a small number of collected email address) to first start with the GSP Customer match campaign.

In our testing, GSP campaigns achieved the best results in comparison to other Customer Match campaign (12.18% Gmail clicks to website CTR compared to 3.55%), however, do not forget that the GSP campaigns are type of display advertising.

 

In conclusion, although Customer match requires a very large email list, which generates a relatively small number of ads impressions,  it’s worth to advertise through remarketing campaigns with targeted customer email list.

It is also possible to test:
• advertising specific actions intended for customers in the loyalty program,
• sharing of specific action for offline stores,
• special offers of new products, lines, brands, etc.,
• the opening of new physical stores with geographic targeting

So, follow our blog and our social accounts, where we will publish new tests and new possibilities offered by Google AdWords.

Site Speed reports in Google Analytics

A small refresher course in how you deal with site speed reports and page timings in particular. As Google announced site speed to be one of the ranking factors the issue got more ‘real’ – a wast number of articles show the importance of site speed and its effect on the business outcome (a recent one by Stéphane Hamel shows some numbers – link) yet the most important thing is the end user which may or may not like slow loading pages.

This article will present 2 simple things:

  1. Technical manipulation of the site speed measurement
  2. Averages suck – drill down

How to set the site speed feature for Google Analytics (Page timings)

Some basic facts:

  1. Site speed info is sent without any additional GA code needed
  2. Site speed info is sent with pageview hits
  3. Site speed sample can be increased reduced with additional code
  4. Default site speed sample size is described here

The implementation part if you want to manipulate the sample size is quite easy as you only need to slightly adapt the basic GA tracking code (info on the siteSpeedSampleRate field):

ga('create', 'UA-XXXX-Y', 'auto', {'siteSpeedSampleRate': 50});

Note that the values expected are 0-100. The default value, without any code adaptation, is 1%.

With GTM it is even easier to do this. It also allows you to be flexible if you want to determine for which part(s) of the site you actually want to see a larger sample – more important parts of the site.

For instance if you by any chance use dynamic remarketing there already is a variable present which you can freely use such as ecomm_pagetype which provides info on the page type viewed (conversionintent, searchresults, category, product etc.).

A simple example of how to set siteSpeedSampleRate in GTM

This example is based on the assumption you already have dynamic remarketing variable present on the site (if not you can always create a customJS variable and set the siteSpeedSampleRate based on Page URL or similar).

Variable 1 – fetch the ecom_pagetype value (example based on dataLayer)

Screen Shot 2016-02-12 at 09.29.34

Variable 2 – set the siteSpeedSampleRate based on value from ecomm_pagetype variable

Screen Shot 2016-02-12 at 09.31.07

Just to explain a bit we set the input values as expected strings from the ecomm_pagetype variable and set the output as values used for the siteSpeedSampleRate field – a lookup table variable is used in this case. And one additional thing if the variable does match any of the explicitly defined strings we set the default value to 1 (you can freely change this to any number you prefer (0-100)). By doing this you effectively increase the chance the timing hit will indeed be sent.

The Google Analytics Pageview Tag – one and only in this case 

Screen Shot 2016-02-12 at 09.32.30

The only thing you need to set inside your main Pageview tag is the Fields to set part – Field Name: siteSpeedSampleRate and Value: {{util – siteSpeedSampleRate}} (or any other variable name you set). Publish.

The results

Nicely described here –  https://support.google.com/analytics/answer/2383341?hl=en&ref_topic=1282106.

The averages suck part

With page timings be very very careful when analysing data as for some pages the sample can be so small it can easily lead you to wrong conclusions.

A small example on data collected from this blog. When looking at Behavior > Site Speed > Page Timings report there will probably be pages which are above or below average for a metric such as avg. page load time.

Screen Shot 2016-02-12 at 09.49.28

Issue detected? Of course you would need to check if that page has an obvious reason as it can be resource heavy so try not to compare to average but with similar pages (page types – use Content Grouping!). A very simple approach to continue detecting the reason if nothing obvious is found – secondary dimension. Just click on the page in question inside the table report and add a secondary dimension which will reveal the context – as an initial idea try Country, Device Category, Browser or similar. For example:

Screen Shot 2016-02-12 at 10.00.03

Yes, our site on mobile sucks. But do not be hasty in making such decisions – always use an additional segmentation to prove this hypothesis. So lets see the issue with an another Secondary dimension:

Screen Shot 2016-02-12 at 10.05.49

Now you can definitely see  there are some outliers (in a sucky small sample of data) which affect the average heavily which can defeat any initial hypothesis we created.

Standard reports will only get you so far. For more in depth look at the issue create a Custom report which will allow for a more granular look at the data and some more metrics (more appropriate). Create something like this – custom report link where it is much easier to find the ‘real’ culprit and act on it.

 

 

 

How to set up Google Analytics and Google Tag Manager code in WordPress

WordPress is an open source content management system, it is easy to use and  there is a large selection of templates and plugins. WordPress is the most popular and most used CMS system. According to research, WordPress occupies almost 60% of the CMS market. In total of all web sites, WordPress is active on 25% of the market. On the other hand, it is important to have a Google Analytics implemented on your website because it is one of the basic tools to monitor user behavior and you can measure the success of your marketing activities on the Internet.

 

Since many websites use WordPress, this blog post will show you how to set up Google Analytics and Google Tag Manager codes on WordPress website.

First of all, you need to find and copy Analytics code. Log in into your Google Analytics account, click on the top of the bar on Admin. In the middle column (Property) click on Tracking Info and then on Tracking code. There you will find Analytics code that you need to copy on your website.

Google analytics code

There are many ways in which you can implement Google Analytics code in WordPress, but we will explain the two easiest and least painful ways, which allow the installation of code in the <head> tag, just as Google proposes:

1. Using a plugin – there is a lot of plugins that let you implement Analytics to WordPress site. But one of the easiest method is using the Insert Headers and Footers plugin.

For start, install and activate the plugin. Once you activate it, click on the left side on Settings and then on the Insert Headers and Footers. In the Scripts in Header field you need to paste Analytics code. After that, just click on blue button Save and you are done!

wordpress-plugin-insert-analytics-code

 

2. Directly in the code – WordPress contains Editor, which allows us to modify the code, which means we can actually implement Analytics code without using the plugin.

So, on the left side, click on Appearence and then on Editor. On the right hand of the Editor, find the file called Theme Header (header.php) and click on it. In the code find </head> tag, just paste Analytics code right before the closing </head> tag and click on blue button Update File.

analytics-code-insert-in-wordpress-header

These are two easiest ways to install Analytics code on your WordPress site.

Implementing Google Tag Manager code

Implementing Google Tag Manager code works in the same way as the installation of Analytics code in second step. Google recommends that the GTM code needs to be placed immediately after the opening <body> tag, so its better paste it directly into the code. So you need to go to Editor (Appearence->Editor), on the right side, find the file Theme Header (header.php) and click on it. In that file, find opening <body> tag and paste GTM code after it.

google-tag-manager-code-insert-in-wordpress

 

If you want, you can use plugin too. One of the best plugins is Duracell’s Tomi Google Tag Manager for WordPress. But be careful, some plugins implement GTM code in footer or header.

 

If the process isn’t entirely clear or you have difficulties with the implementation, we recommend to seek help from your developer.

Traffic management based on product performance with Google Analytics

The goal of the article is to provide the tools needed to determine which traffic acquisition channel is responsible for selling a specific product or set of products. We will do this in 2 parts. The first one deals with the direct tie between the product and the acquisition channel – please note we will be working in the realm of last non direct attribution model so it is all about the last known source. The second part deals with the situation where the product is hard to sell directly so we need to resort to more devious sales methods in specific using related products – in simple terms sell more product X by selling more product Y.

Part 1 – tie between the traffic acquisition channel and the product

Note that the following tool does not, by default, say which channel is the most effective – cost effective yet gives the information on sales volume related to source.

A prerequisite is of course a working GA property and ecommerce tracking implemented.

Believe it or not this report is available in standard reports though a bit hidden. Go to Conversions > Ecommerce > Product performance report.

Screenshot_50

Choose Pivot table for report display type.

Screenshot_51

 

Proceed to dimension and metric selection process:

Screenshot_52

  • Primary dimension can report on Product name, category and sku
  • Pivot by offers a selection of dimensions which you need to make sense of – depends of the questions you have:
    • choose a time based dimension if you need an answer when to sell
    • choose campaign if you want to see which campaign sold which product
    • choose basic default channel grouping (works only with standard ecommerce and not with enhanced ecommerce) or source / medium if you need a high level understanding what drives sales for a particular product (as in the current example)
  • Metrics are limited to product related scope

The table can be further filtered as appropriate – e.g. only products which generated > 10.000 product revenue.

Once the report is set you can use the Shortcut feature which will save most of the report settings and probably save you time on further reporting efforts.

Screenshot_53

Are there other ways to do this? Of course yet this is the easiest one for ad hoc analysis. Based on the report you can redefine your traffic management based on sales requirements – it gives a simple answer which channels you invested before which generated product X sales volume – this gives you the opportunity to test how a specific channel scales and can it give more.

Part 2 – Related products – Sell more X by selling more Y

So our product X is really hard to sell by itself. All our direct traffic acquisition efforts have failed (long tail campaigns) yet the product seems to sell but from completely unrelated campaigns. A solution may be that the product is more sell friendly by pushing campaigns for related products where users buy it as an additional product. So how to obtain this valuable piece of information?

Option 1 – Custom segment

Build a custom segment (the segment is user scoped) which will in return report the following – report on all products which have been bought in transactions, in defined time range, where Call of Duty: Black Ops III (our product X which causes problems) was in at least one of the transactions.

Screen-Shot-2015-12-23-at-10.58.39

Option 2 – Related products – ecommerce feature

This is an ideal way to automate the data pull and gain some insights into correlation between products inside a transaction. It is usually used when you do not have access to a more advanced CRM / ERP which does these things – is built for these things.

Prerequisites include a working GA property, ecommerce tracking implemented and the feature enabled inside the GA view ecommerce settings.

Screen-Shot-2015-12-23-at-11.04.58

Once turned on it allows us to fetch additional dimensions and metrics using Google Analytics Core API – more info on the subject:

For testing purposes you can use this nice addition to Google tool set – Query Explorer where you can fetch the data on the fly – basically test your query prior to any automation attempt.

Screen-Shot-2015-12-23-at-12.28.42

After the basic setup is done you may do more tinkering in terms of filters applied – only specific product Ids or only results where the correlation score metrics is >0.8.

The end result is a table which displays the queried product Id, related product Id and the correlation score (values can be 0-1 – where values closer to 1 is what we are after – high level of correlation between the products).

Screen-Shot-2015-12-23-at-10.49.41

This kind of report can then easily be replicated in Google Sheets using the Google Analytics extension which also allows filtering flexibility and scheduling / automation.

Screen-Shot-2015-12-23-at-12.41.37

Screen-Shot-2015-12-23-at-12.44.23

When you find products with high correlation score to your product X revert to part 1 of the article and see which channel is responsible for sales and test the scalability to improve both product X and product Y sales. 

 

How to track internal campaigns using Google Analytics

Let’s start with the basics …

What is an internal campaign

An internal campaign, from a business perspective, is any element on a site(s) which links to your content and its purpose is to speed up the purchase decision, highlight a product or category, give incentive in any part of the purchase funnel and more. A simple example would be a click on banner which is placed on our home page – www.mydomain.com/ – which links to a product page (also on our site(s)) – www.mydomain.com/productPage/.

Some examples / methods of internal campaigns:

  1. urgent – offer ends in 2 hours
  2. limited – only 5 left
  3. popular – top 5 products
  4. deal – buy 1 get one for free

The truth of the matter is internal campaigns are often used to push products with these common attributes – hard to sell, large stock, high margin and let’s not forget fill the gaps in design:)

A simple example (zappos.com – part of the homepage):

zappos_internal_campaign_example

Why track internal campaigns

The obvious reason is – why not. Internal promotions often take a lot of screen real estate and this fact should not be taken lightly. Aside from that you need to invest time and money for campaign production – copy, images, … so in short you owe it to yourself to prove / test its (in)efficiency. From a marketeers perspective there are some quite useful goodies gained from tracking internal campaigns – what works and what does not:

  1. copy
  2. incentive type
  3. position
  4. colour
  5. season
  6. category
  7. price
  8. and so much more

 

Before we get to how to track these campaigns …

How NOT to track internal campaigns

Do not use UTM tagging to track internal campaigns. Never. Never ever.

There may be some cases where you feel tempted to use UTM taging such as a multisite environment where you own multiple properties – still, don’t.

A common error in web analytics is using features like UTM tagging for the wrong reasons resulting in bad data. If we opt to tag internal campaigns with UTM we actively affect Google Analytics traffic source attribution. Let’s see what happens if we do:

  1. A user clicks on our Google AdWords ad – Google Analytics will report on this session as coming from google / cpc
  2. Inside that session the same user clicks on our banner which has UTM tags (utm_source, utm_medium, …)
  3. This results in traffic being attributed to our banner and not Google Adwords (and will create a new session)
  4. If a user activates a type of conversion on our site standard report will attribute it to Internal campaign while the MCF part of reports will attribute Google AdWords as an assisting channel in the conversion path – a mess not easy to decipher

How TO track internal campaigns

You will probably encounter a few main methods of how to properly track this sales tool. The most popular ones are:

  1. Site search – this was nicely explained by none other than Justin Cutroni
  2. Enhanced ecommerce – this is probably the first Google Analytics feature which has a specific area designated for internal campaign (promotion) tracking this is also by far the most difficult method of tracking (as tracking internal promotions makes real sense only if you track all other EE activities on the site)
  3. Event tracking – a very flexible method of tracking almost anything on your site (I will describe some of the basic ways to do event tracking with Google Tag Manager)
  4. Custom dimensions – in addition to event tracking we can add a new layer of data to existing hits (events / pageviews) in order to better describe the actual internal promotion

As the methods 1 and 2 are described thoroughly let’s focus on event tracking and custom dimensions and we will do a hybrid of these 2.

Tracking Internal campaigns with Google Analytics Event tracking

First of all we need to decide the naming policy for our event / campaign tracking efforts. In short what will be the category, action and label values used throughout the site – note that if the naming is not consistent, time and site wise, it will be really hard to do meaningful reports. So lets revert to the basic questions – what would we like to know:

  1. Does the internal campaign help sell stuff? – we have that covered – create a segment using category / action / label and track conversion behaviour
  2. Which internal promotions are most likely to sell (and why – tricky but at least try)? – we need info here on:
    1. promotion placement (page, position)
    2. size, color, copy (think in terms of utm_content)
    3. incentive type (price, urgency, loyalty, package, any additional added value)
    4. some other attribute

As you can imagine it is not a small feat to push all these values into 3 event hit default dimensions so there is always the option to add a custom dimensions in the mix to help out (if you can spare the Custom dimensions slots!!! – note there is a limit of 20 CDs per property). An initial suggestion would be:

  • Event category = ‘internal_campaign’ (if we have a rollup property we can add the site the click happened on so it would be ‘internal_campaign_sitename’ (think utm_source))
  • Event action = ‘shoes_men_spring_2015’ (think utm_campaign)
  • Event label = ‘250*250|red|buy_now|a|2’ Ad / Banner / Campaign content (think utm_content) – size of the banner, color, CTA, variation, position (if a slider present)
  • CD1 = incentive type or some other attribute = hit scope dimension

Now that we solved what we wanted to report on let’s see how can we retrieve these values. this part will emphasize on the fact that GTM is not a one click install system and it often requires additional development work on site as the site itself is rarely built to provide info which marketeers need in an easy to consume / report form.

Trigger the Google Analytics Tag Event tag

So lets first solve the triggering part where we want to send a GA event only when someone clicks on an Internal campaign ad / link. For this case we need a way to identify the click on the internal campaign.

Here are a few basic options to solve the trigger part:

  1. use the DOM event – onmousedown, onclick – <a href=”#” onclick=”dataLayer.push({‘event’ : ‘trackEvent’}];”> – use the onclick event to push a custom event via dataLayer
  2. use GTM click / linkClick triggers which track clicks on DOM elements / links – these are GTM built in events – <a href=”#” id=”intcmp” data-gtm-data=”someImportantInfo”> – use of GTMs click / linkClick trigger in combination with auto event variables (element attributes (Click ID or element attribute auto event variable – data-gtm-data))

Trigger case 1 (DOM event)

trackEvent_DOM_onclick_event

Trigger case 2 (GTM click / linkClick)

trigger_linkclick_element_id_intcmp

Enable when part is optional and takes care of performance issues so you do not listen the clicks on lets say all pages but only ones that contain internal promotions. When using Auto event variables make sure the ones you will use are activated in the Variables section of GTM interface:

GTM_AEV_variables_enabled

 

How to set and read the data payload for GA event tag

And now we come to the tricky part. It is not hard to send basic info to Google Analytics yet it is quite hard to come by ‘ready to consume info’ from the site. Let’s look at an example – this is not a good example of how to do it properly but an example of what you can usually expect:


<div class="slide" style="width: 980px; float: left;">
<a href="/running.html">
<img src="http://www.somesite.com/media/wysiwyg/company/running3_webbanner.jpg" alt="">
</a>
</div>

As you can see here there is almost no notion of the stuff we would really like to track – position, size, CTA, copy, color and similar. In addition to that there are no clear identifiers of the element being the internal campaign link aside from the class=”slide”.  We have two main options here:

  1. Scrape whatever we can from DOM – Click URL, image name (this gives us a really limited data set in most cases)
  2. Add some code which would better describe what the user has actually clicked (better yet we usually need developer support – preferred version)

Option 1
A very simplified way of sending the info to GTM and subsequently to Google Analytics would be to use a dataLayer custom event:

<a href="#" class="someclass" id="internalcamp" onmousedown="dataLayer.push({'event' : 'trackEvent','eventCategory': 'internal_campaign','eventAction': 'shoes_men_spring_2015','eventLabel': '250*250|red|buy_now|a|2','customDimension1':'price'});">

Option 2
An option where you have lots and lots of Custom dimensions slots available:

<a href="#" class="someclass" id="internalcamp" onmousedown="dataLayer.push({'event' : 'trackEvent','eventCategory': 'internal_campaign','eventAction':'shoes_men_spring_2015','customDimension1':'250*250','customDimension2':'red','customDimension3':'buy_now','customDimension4':'a','customDimension5':'2','customDimension6':'price'});">

Option 3
Yet another option for streamlining event information to GTM is to use HTML data attributes – I personally find this approach very useful but it is usually applicable with long term relationship clients where analytics needs are both a part of the development and marketing process (additional benefit – whatever changes in terms of class or id of the element the data-gtm- logic usually stays intact). So for example:

<a href="#" class="someclass" id="internalcamp" data-gtm-event="internal_campaign" data-gtm-action="shoes_men_spring_2015" data-gtm-label="250*250|red|buy_now|a|2">

The only thing you need to do now is to ‘catch’ the data on link click in GTM and here is how you do it:

Variables
Values needed to identify the right event and to push the final payload to event.

3 variables are needed all type of Auto Event variables where you choose Element Attribute and create all 3 data-gtm- variations.

aev-data-gtm-event

Trigger
How we trigger the Google Analytics event from GTM.

trigger-internal-campaign-click

Tag
Where we send the entire payload to Google Analytics with an event.

tag-internal-campaign-event

Alternative pageview tracking with custom dimensions

Let’s assume you cannot rely on data attributes and events and your only option is adding parameters to links – it is doable and here is how to do it.

Your internal campaign directs to a page on your site:

www.mysite.com/campaignLP (old URL) which you should change to …

www.mysite.com/campaignLP#intcmp&shoes_men_spring_2015&250*250

Follow up steps …

Variables
Read Url fragment – URL type variable where we read everything after #.

read_url_fragment

Custom dimension value extract from URL fragment (you can extract the values to one dimensions or parse the values to separate dimensions) – note that we split the entire string by ‘&’ and use the index 0 which is the 1st item and will in our case return the string ‘intcmp’:

function() {
var myTempString = {{read URL fragment}};
if(myTempString && myTempString.indexOf('intcmp')>-1){
return myTempString.split('&')[0];
}
}

Trigger
An All pages for the pageview tag will suffice. If the fragment values do not exist nothing will be passed as custom dimensions values – will not be processed.

Tag
Use a Google Analytics Universal template tag with the following settings:

internal_campaign_pageview_tracking

And this is it – happy tracking!

Reporting on AdBlock usage with Google Analytics

Ad blocking is a really hot topic these days. Arguably there are two completely opposite stories to follow up on yet we are not dealing with that this time. This post explains how to report on ad blocking occurrence on the site and how it affects your ‘potential’ earnings as a publisher.

There are 3 main steps to this process:

  1. Detect ad blockers and send an event to Google Analytics (we will use it later on in a segment)
  2. Make the number of page ad slots available – ideally using dataLayer (if using GTM)
  3. Create the Custom metric(s) in Google Analytics interface and create the custom reports / dashboards

1. Detect AdBlockers

There are already numerous ways to detect clients / users with ad blocking apps activated so I will only list a few:

You will notice that almost all detection kits use a ‘dummy’ / ‘fake’ ad related file which will hopefully trigger an ad blocking app and this should fire a GA event. You can of course adapt it to detect your real ads being blocked without the need to add the fake script.

The logic

Using any of the for mentioned scripts fire a Google Analytics event e.g. in case you are using GTM push the info via dataLayer:

window.dataLayer = window.dataLayer || [];
dataLayer.push({
'event' : 'trackEvent',
'eventCategory': 'Adblock',
'eventAction': 'Active'
});

Create a Google Analytics Event template tag using these values which is triggered on the custom event trackEvent and you’re almost done (variables and triggers should be created as well):

eventAdBlockSimple

2. Make the number of page ad slots available

Again if using GTM just add the information to dataLayer which will represent the number of ad slots available on a single page. The idea is to simply use getElementsByClassName() which will return an object which has a property length – use this logic to obtain the number  of ad slots available on a specific page (the value which we are looking for is length +1 as the indexing starts at 0).

Easy as:

var adSlotIndex = document.getElementsByClassName('elementClassWhichContainsAnAd').length;

One thing worth noting is that you will probably want to send this info after DOM is ready so choose how to send this custom metric carefully – options are to send it with a pageview (so PV tracking should be DOM ready) or use an event for more flexibility just make sure non interaction is set to true.

In addition you can send another custom metric which will be currency type which will be calculated as total Ad Slots On Page * Average Revenue Per Impression – reporting with currency gives more weight to the whole concept.

eventAdBlockSimpleCustomMetrics

3. GA prerequisites and building the dashboard

First take care of the segment – Session level segment which will be Event Category == AdBlock and Event Action == Active. This will allow reporting on sessions where AdBlock was active – in specific number of ad impressions or better say ads that were supposed to be delivered you could not be as they were … blocked. This segment can be applied to standard / custom reports, dashboards and used in API exports.

Secondly create the custom metric(s) on GA property level.

And now it is all up to you to show the data best way you can – the way it will make you do something to battle this revenue consuming trend.

eventAdBlockSimpleDashboard

Some reports details to consider: browser, browser version, geography based dimensions, content grouping (LP or page – to determine where this revenue source is most sensitive) – you will probably find more useful dimensions.

Hope this helps in determining how much money you loose from ad blockers:)

Happy tracking!