Cross-domain tracking has been the bane of any analyst’s experience for, oh, just about ever. It is probably the hardest thing to get right in a Google Analytics implementation, and in our experience, more people ask us for help with this one issue than any other.
Over the years we’ve dealt with this problem in different ways. jQuery made it easy to drop in a couple lines of code to track behavior across domains, but even then it wasn’t exactly automatic.
Then along came Universal Analytics and Google Tag Manager – the perfect 1-2 punch combo to knock out cross domain tracking once and for all. We held a webinar to show people step-by-step how to implement cross-domain tracking in Google Tag Manager. Below is a recording of the webinar, along with the written step-by-step instructions.
UPDATE: Due to events beyond our control, the webinar has been postponed until Tuesday, November 5th at 1:00pm EST. Our sincere apologies.
It’s been almost a year since Google Tag Manager was introduced, and as we scan the product forum, it’s clear there are still many questions about how it works (both generally and specifically). (more…)
Don’t let bad data crash your analytics party.
One of the benefits of client-side, tag-based analytics (as opposed to server side analytics) is that you generally don’t have to filter out traffic from bots.
However, it seems lately that some bots (*cough, cough* Microsoft) have been showing up in Google Analytics like an uninvited guest, crashing the data party. (more…)
In part 1 of this series, I showed you how to use Universal Analytics and the Measurement Protocol to track whether or not someone opened your email.
Now we’re going to kick it up a notch use email to tag visitors with a unique ID. This will let you track visitors to your site across devices, like below:
We’ll continue from where we left off after the last post, so I’ll assume you’re already using Universal Analytics, and you have a custom metric set up to keep track of email opens. We’ll continue to use MailChimp to walk you through setting this up, but you should be able to apply these steps to whatever email marketing platform you’re using.
In step 1 of the last post, you created a custom metric in the Google Analytics admin interface called Email Opens to track the number of times an email was opened. This time, you’ll create a new custom dimension called Visitor ID to keep track of individual users.
Log in to Google Analytics and go to the Admin section. Select your account and web property, and click on Custom Definitions under the Web Property column. Then click on Custom Dimensions.
In the next window, click on the New Custom Dimension button, and give your custom dimension a name (I recommend Visitor ID) and set the scope to User. Also, make sure the Active check box is checked.
Now that you’ve set up your custom dimension, it’s time to start populating it. In our example, we’re going to do that through email marketing. When someone opens your email, it will show up in Google Analytics as an email open from visitor ID 12345 (or whatever their ID is). And when they click on a link in the email, it will show up as a visit from that same visitor ID.
To do this in MailChimp, there’s a feature that we’ll take advantage of called Ecommerce 360 link tracking. You’ll find this in the Setup phase when you’re creating an email campaign – check the box for Ecommerce 360 link tracking:
So, what is Ecommerce 360? Basically, it makes it possible to track visitors from your email campaigns, capture transaction information, and pass it back to MailChimp.
But that’s not why we’re using it. We’re using it because when you have it enabled and someone clicks on one of your email links, it adds a couple of parameters to the end of your URL. Specifically, these are the parameters:
The mc_cid parameter is the internal MailChimp campaign ID and the mc_eid parameter is the unique, MailChimp-generated ID for the list member.
In other words, MailChimp is giving you the unique ID to use in your Visitor ID dimension!
To get that ID stored in your Visitor ID custom dimension, you’ll need a tiny bit of script on your page to check for that value in the URL and capture it. If you look at the source code on this site, you’ll see our Universal Analytics code has been updated to include this extra code (lines 9-17):
ga('create', 'UA-296882-21', 'lunametrics.com');
var hash = location.hash;
var mcId = hash.match('mc_eid=(.*)');
var cid = tracker.get('clientId');
var vid = mcId;
ga('set', 'dimension1', vid);
With the script above, plus the Ecommerce 360 option in MailChimp, you’ll now be capturing the user ID of visitors who click on the links in your emails, but remember, we also want to do that if they open the email (without clicking a link).
To do that, we’re going to modify the code from step 6 in the previous post. This is where we’re placing our “fake” image at the bottom of the email that sends the data to Google Analytics:
The only difference from the previous post (the code above) is that we’re now also going to add the unique ID to the custom dimension. We can do that as follows:
OK, so I admit that you’ll have to roll up your sleeves and get your hands a little dirty with some code. But your efforts will be rewarded with large sums of money and glory.
You’ll now be able to see the following scenario playing out in your data:
Visitor ID 12345 (which you can match back to John Q. Smith in MailChimp) opened your email on his phone on a Monday. Then he opened the same email from his computer on Tuesday and clicked the link to go to your site, where he browse around but didn’t convert. Then he came back to your site on Thursday and made a purchase (or signed up, subscribed, etc.).
Cross device nirvana!
You have some data about your email marketing (for example, open rate) in your email marketing software, and data about visits to your site from email marketing elsewhere (namely, Google Analytics).
Wouldn’t it be great to see an end-to-end view of all that data in one place? With Universal Analytics and the Measurement Protocol, you can, and I’ll show you how, step-by-step.
Today’s post will kick things off by looking first at how to track email opens in Google Analytics. My next post will show how to tag a visitor with a unique ID, so you’ll be able to track them across devices (like in the image below). Finally, we’ll tie it all together so you can see visitor behavior from opening your email to visiting your site and (hopefully!) converting.
We’ll use MailChimp - a popular (and free, if you want to play along) email marketing manager to walk you through how to set this up, but you should be able to apply the same steps to any email marketing solution you use.
Google Analytics Content Experiments are a great way to quickly and easily set up simple A/B tests for your website. And for most people, setting up these experiments can be done using the interface in Google Analytics.
However, there are some who desire a little more control over the variation pages, that just can’t be done through the setup wizard.
For example, when you’re choosing you’re variation pages, you can specify full (exact) URLs for the variations, or relative URLs. If you choose to specify the variations by the full URL, you’d end up with something like:
If you choose relative URLs, you can take advantage of query parameters to specify your variations. This makes it possible to do site-wide tests, by placing the Content Experiment code on every “original” page of the site. Then, for your variation URLs, you’d have:
Want to know the ROI of your email marketing? What about the performance of your print ads? Are your posts to Facebook leading to conversions on your site?
Tagging your marketing campaigns is essential to get these actionable insights from Google Analytics. But you might have more than one person responsible for all of your marketing initiatives (imagine that!). You might have teams of marketers and content writers who all dip their hands in the the campaign cookie jar from time to time. That’s great! If you’ve gotten to the point where your non-web analyst peers are tagging their URLs with campaign parameters, you’ve already overcome the biggest hurdle. Now, if only you could get them all to use the same naming conventions… (more…)
Have you ever set up a goal in Google Analytics, and later wanted to delete the goal from your profile? You go into the Admin section, click into the Goals tab for the profile, and search for the “delete” button. But you don’t find it.
That’s because it doesn’t exist.
This is a common question that’s been asked before, and it recently came up at our Google Analytics training last week.
In Google Analytics, you have four sets of goals, each with five goal slots available. Hence, you can create a total of 20 goals per profile.
Goals let you define success for your website. You tell Google Analytics what you want people to do on your site, and when they do it, it counts as a goal. You can even tell Google Analytics how valuable the goal is to you. (more…)
Dimensions and metrics are the building blocks of your reports in Google Analytics, but so often I see confusion about the difference between dimensions and metrics. And even when you have a fair understanding of what dimensions and metrics are, you may not realize how many of them you actually have to choose from.
There are more than 230 (!) metrics and dimensions you can choose from when you’re creating a custom report or advanced segment. I’ve created a simple spreadsheet that should help expose the many options you have. You can download it now, but before I talk about that, let’s get everyone up to speed on the basics.
Dimensions describe the data. They are the labels in the rows of your reports. Think of a dimension as describing the “what,” as in “what keyword did they use” or “what city is the visitor from” or “what pages were viewed.”
Metrics measure the data. Metrics are elements about a dimension that can be measured. Think of a metric as answering “how many” or “how long,” as in “how many visits” or “how long a visitor was on the site.”
Now, back to those 230+ metrics and dimensions. The spreadsheet organizes them into two tabs – Dimensions and Metrics (big surprise!).
For each dimension/metric, it lists the name and definition. It also tells you what type of data is being measured or described (visitor, page tracking, AdWords, etc.). I’ve also included the API reference for each metric/dimension that is available via the Google Analytics Reporting API.
There’s also a column labeled Where You’ll Find Them, which tells you how they are (unfortunately) categorized within the custom report and custom segment creation interfaces. For example, if you’re looking for the User Defined Value dimension, it’s located under Content (instead of Visitors, where it belongs). Looking for the % Exit metric, check under Visitors (instead of Content). You get the idea.
Now it’s your turn
Still confused about dimensions and metrics? Wondering about some of those odd metrics, like TV Impressions are? Ask us below!
A question I hear frequently is “can I track form abandonment in Google Analytics?” The answer is yes, and I’ll explore the details in a moment, but you should first consider alternative solutions.
There are existing solutions (like ClickTale) that do this in a much more elegant manner, with reports dedicated specifically to form analytics. Think of it like the goal funnel visualization reports, but applied to forms.
However, if you don’t want to spend the money on an alternative solution, or you want to keep everything in one place (i.e., Google Analytics), I can help you.
Tracking forms with events
You can use event tracking to find out which fields of your form are being filled out, and which ones are causing people problems. To do this, you can fire an event whenever a user’s cursor exists a field of the form. The easiest way to do this is with a script like below: