Limited AdWords data in Google Analytics

For a recent task I needed to pull a combination of AdWords and Google Analytics data:

Dimensions needed: Campaign, Ad Group, Keyword, Device Category, Hour, Custom Dimension 2
Metrics needed: Sessions, Bounce Rate, Clicks, Cost, CPC

Easy, right? First, I tried a simple custom report:


But when you run it, there’s no data for the AdWords metrics (clicks, cost, CPC):



So it turned out that when you connect AdWords and GA, you can combine a limited number of dimensions. In our case, it will work if I remove the Hour and Custom dimensions:


The AdWords support sent me a copy-paste reply about the AdWords API, although my original question was about GA Reporting API:


Their Twitter support was more adequate:


So you can combine your AdWords metrics with specific GA dimensions only. The available options are:

Acquisition: medium, source, source/medium, traffic type
Advertising: account, ad content, ad distribution network, ad group, adwords ad group id, adwords campaign id, adwords creative id, adwords criteria id, adwords customer id, destination URL, keyword, keyword match type, query match type, query word count, search query, social annotation type, trueview video ad
Time: date, day index, day of the month, day of week, day of week name, month index, month of the year, month of year, week index, week of the year, week of year, year
Users: device category, mobile (including tablet)

No custom dimensions, hours, behavior, social or ecommerce dimensions.

In addition, there are different options available in the different AdWords reports as well. For example, you can add keywords as secondary dimension to search query in the Search Queries report, but you can’t add search query as a secondary dimension to the Keywords report. The Hour of Day report doesn’t contain any Clicks tab / data. The Sitelinks report is also limited being quite new.

So just something to keep in mind – not all AdWords metrics are available for different combinations in GA reports.

5 Google Analytics posts you don’t want to miss in September

Here’s again the last post of the month saved for the top 5 interesting Google Analytics related resources I found on other sites.

So much good stuff this month! It’s hard to pick up only 5 blogs to share. Here’s the selection for September – you may want to bookmark those as they can be very useful:

Magically track forms using Google Analytics

In this post Benjamin shows how to use Komito Analytics to track form abandonment and interactions fast and easy. It’s JavaScript that you can add in Google Tag Manager and automatically track a number of custom interactions.

Tracking Multiple Categories in Google Analytics for Content Pages

A step-by-step tutorial how to track articles that are associated with multiple tags and categories in Google Analytics. You’ll create a custom dimension for each page category and a custom metric to track how often each category is viewed.

Get the Recipe: Hover Tracking in Google Tag Manager

Google Tag Manager doesn’t automatically listen for hover events and the awesome guys at LunaMetrics provided a recipe that you can download and import into your GTM container. Follow the extra instructions and start tracking hover events!

10 JavaScript Concepts For Web Analytics Implementation

This blog from Simo follows a conference talk he gave at MeasureCamp IX, London earlier this month. I agree that understanding the JavaScript basics are extremely important in web analytics implementation. Go through the 10 JS concepts presented and if you’re still feeling lost, go ot Codecademy, get a book about JS and practice!

Google updates – there were so many amazing announcements from the GA team: you can move GA properties (extremely useful for agencies that have all their customers GA sites under one account), work with the improved unique events metric and sign up for the free Google Optimize!

P.S. Got a Google Analytics question? Send it to me and I’ll try to answer it on the blog.

Check Geo Location for Specific Pages in Google Analytics

Here’s a recent question I got:

“We have a website, but there’s a specific set of pages at that are used for a presentation tool for potential customers. We need to see for the visitors who view these special pages, which US states they are coming from.”

Let’s build an advanced segment to achieve this.

Open Google Analytics and click on + Add Segment at the top and the red + New Segment. Give your segment a name, like Demo pages, choose Conditions from the left pane and filter for Sessions – Include – Page – Contains – /demo/

demo pages segment

Then go to Geo -> Location report with your new segment applied. Click on United States and you’ll get the list of states (called Region in GA):

states segment applied


You can go to any other standard or custom report with the same segment applied to check what’s special about these potential customers.

This is just a simple example of how powerful the advanced segments can be.

Track onclick event handler value with Google Tag Manager

It’s not very common but you may stumble upon a case where you need to record the value of an onclick event handler.

Usually you have a JavaScript function and the “onClick” event handler executes a piece of JS when an element is clicked on. It can be added to elements like <a> tags, form buttons, check boxes, <div> tags, etc. Here’s an actual example:

function inform(){
alert("You have activated me by clicking the grey button! Note that the event handler is added within the event that it handles, in this case, the form button event tag")

&lt;input id="click-me-button" type="button" name="test" value="Click me" onclick="inform()"&gt;

On this test page we have a button that will show an alert when clicked. And we want to record an event with some category that we define and the onclick value as action (it will dynamically change if you have different onclick event handlers).

Let’s build our variable first:

function() {
var field = {{Click Element}}.getAttribute('onclick');
return field;

It will get the onclick value of the element you’re clicking.

onclick variable

Now let’s enter Preview & Debug mode and see if it does what we need – click on the button and explore the variables list:

onclick GTM preview

Looks good! Now we can build a simple event tag in GTM, firing on the click of this button:

tag settings

Publish the workspace and start gathering data:

real time results

So, that’s it! What kind of onclick event handlers do you need to track?

5 Google Analytics posts you don’t want to miss in August

Here’s again the last post of the month saved for the top 5 interesting Google Analytics related resources I found on other sites. Here are the five for August – you may want to bookmark those as they can be very useful:

Introducing the Google Analytics Demo Account

In the beginning of the month Google Analytics launched a fully functional Demo Account, available to everyone, with real ecommerce data from the Google Merchandise Store. Avinash published a great post about it, explaining how to get access and jump-start your learning: Be Real-World Smart: A Beginner’s Advanced Google Analytics Guide

Two Steps To Correctly Tracking Subdomains in Google Analytics

This LunaMetrics article shows how to properly implement subdomain tracking in Google Tag Manager, along with example scenarios. Check out the reasons why you need (or don’t) subdomain tracking and what to do next.

Troubleshooting Cross-Domain Tracking In Google Analytics

In this post Simo shows the easiest way to implement cross-domain tracking – through Google Tag Manager. You can use his short checklist to identify issues and make sure cross-domain tracking is working.

GTM Match Table Variable Generator (Lookup Tables & Beyond)

Despite being an extremely useful feature in Google Tag Manager, the lookup table Variable can be tedious to configure and it supports exact-match only. You can use this template by Seer Interactive to easily create a big lookup table or get regex support.

Enterprise-Class Tag Management: Announcing Workspaces

Google announced a major update to Google Tag Manager introducing workspaces and interface changes. Simo Ahava published two quite comprehensive articles on the same day which can be used as walk-throughs for the new features:

P.S. Got a Google Analytics question? Send it to me and I’ll try to answer it on the blog.