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

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 April – you may want to bookmark those as they can be very useful:

Universal Analytics User ID: Setup Guide

Here Tom Capper from Distilled shows how to use the User ID feature in GA either with your tracking code or using Google Tag Manager. In addition you can create a separate User ID view and take advantage of 3 unique reports: Cross Device, User Engagement, and User-ID Coverage.

Data Layer Forensics: Ecommerce Edition

The amazing guys at LunaMetrics are providing a way to troubleshoot ecommerce analytics. If you wonder if you pass the correct parameters to the data layer, just use their code to fire an event and a transaction at the same time and cross-check for potential issues using their 5-steps checklist.

Breaking: Google Tag Manager Refresh – 6 Things You Need to Know

On October 15th Google announced updates in Google Tag Manager. The new interface is available at http://tagmanager.google.com/ with navigation structure much similar to Google Analytics, rules are renamed to triggers, and macros are renamed to variables. Two more things: listener tags are enabled by default and there’s API available.

The Ultimate Guide to Universal Analytics Integration with SalesForce

It’s always important to connect your CRM with Google Analytics to get insights what type of lead generation / traffic sources are actually bringing real live sales. If you happen to use SalesForce, this is a step-by-step guide to connect SalesForce and GA.

Benchmarking Performance: Your Options, Dos, Don’ts and To-Die-Fors!

Here’s another great blog post by Avinash evaluating 4 different strategies for collecting benchmarks: own data benchmarks, industry analyst data benchmarks, competitor data benchmarks and vendor data benchmarks (explaining in detail the new GA Benchmarking reports).

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

Track Add to Cart events in Google Analytics with Google Tag Manager

If you’re interested in conversion optimization and improving your ecommerce websites (and you should be!) it’s really important to track when a potential customer is adding an item to the cart. Having such information you can segment visitors to people who are adding stuff to the cart but not checking out, or people who are viewing products but not adding them to the cart.

A few 3rd party shopping cart providers offer this feature out of the box, but the majority don’t. Usually you can look at the Behavior – Site Content – All Pages report and look for the /cart page, but you wouldn’t know if the generated pageviews are from people clicking the Add to Cart button on a product page or clicking the cart icon to review their cart.

Working with developers, sending instructions with onclick events to be implemented, waiting for a sprint or two, and finally be able to test and collect data is sometimes long and tedious process.

Luckily, Google Tag Manager is here to help. All you need to have is GTM container snippet added to every page of your site.

Important: most probably you’re already using GTM V2 where the interface is a bit different, go to new instructions.

1. Click Listener

First, we need to create a Click Listener tag in GTM:

1. Click New – Tag
2. Tag Name: Click Listener
3. Tag Type: Event Listener – Click Listener (be careful, there’s also a Link Click Listener, which is different)
4. Firing Rules: All Pages
5. Save

Click Listener tag

2. Identify the Add to Cart event

Now we need to identify our Add to Cart button. For our example we’ll show Magento:

Navigate to a product page and locate the Add to Cart button. Right-click on it and select Inspect element in Chrome. The Developer Tools window will open and show us details about the button. We’re interested in the CSS class of this HTML element – in our case the CSS class is “button btn-cart”. We copy it and go to GTM again.

Identifying add to cart element

Now we need to create a rule – only when a visitor clicks the HTML element with class “button btn-cart” we want to record an event in GA.

1. Click New – Rule
2. Rule Name: Add to Cart
3. {{event}} equals gtm.click
4. Click the + sign to add one more condition
5. {{element class}} equals button btn-cart
6. Save

Add to cart rule

Please note that you may have class or id for your shopping cart system (WooCommerce, Magento, OpenCart, PrestaShop, Shopify, BigCommerce, etc.) Just follow the steps above to see how it’s called.

3. Record the event in GA

All we have left is to create the GA tag which will record our Add to Cart event.

1. Click New – Tag
2. Tag Name: UA Add to Cart (UA here stands for Universal Analytics)
3. Tag Type: Analytics – Universal Analytics
4. Firing Rules: Add to Cart (the rule we just created)
5. Tracking ID: paste here your GA tracking ID (you can get it from GA under Admin – Property – Tracking Info – Tracking Code and it’s in the format UA-XXXXXX-Y)
6. Check Enable Display Advertising Features if your tracking code is modified to support Demographics and Interests reports and Remarketing through Google Analytics.
7. Track Type – Event
Choose how you want to name your category, action and label, for example:
Category: Add to Cart
Action: click
Label {{url}}
For example I want to record as a label the product page where the visitor clicked the button, that’s why selecting the macro {{url}}.
8. Save

GTM Event tracking

4. Test and publish your GTM version.

5. Check the results in GA.

Open your site, navigate to a product page and click the Add to Cart button. Go in GA to Real-Time – Events report and check if your event is recorded properly.

So now you track when people are adding products to the cart. In a similar way you can track many other activities: remove from cart, add to wishlist, form fields abandonment, video interaction (play, stop, watch to end), usage of tabs on product page like product description, shipping, returns, reviews, etc.

*** Update: Here are the steps for the new interface V2 of GTM:

1. There’s no need to create a click listener as it’s already built-in. Assuming your CSS class is the same “button btn-cart” let’s see if the Click Classes variable is enabled. Go to Variables in the left pane and make sure Click Classes is checked.

2. Now let’s create the trigger. Select Triggers – New, give it a name, e.g. Add to cart, and select Click for event, All elements for Configure trigger, and in the Fire on section Click Classes equals button btn-cart, like below:

add-to-cart-trigger

3. Now we need to create the tag. Select Tags – New, give it a name, product Google Analytics – Universal Analytics, enter your tracking ID or constant variable, track type Event. Choose how you want to name your category, action and label, for example:
Category: Add to Cart
Action: click
Label {{Page URL}}
For example I want to record as a label the product page where the visitor clicked the button, that’s why selecting the macro {{Page URL}}.
Hit Save, preview and debug your GTM version and if everything looks OK, publish.

If you have questions or difficulties configuring the tracking, drop me a comment below.

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

I can’t accept Google Analytics Terms

You’re creating your new Google Analytics account. You fill in the fields, click on Get Tracking ID, the Terms of Service Agreement appears and… it seems there’s no way to accept it! Even if you scroll-down to the bottom, there’s no button.

No I Accept button

This has been a UI issue for quite some time now.

Here’s the quick work-around: if you’re using Chrome browser point your cursor to the header of the pop-up, it will change to show you can move it, just drag it up and you’ll see the two options: I Accept and I Do Not Accept.

Accept GA Terms

Now you can finish your sign up process and get your tracking code.

Happy Analytics!

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

Sampled data visualization changes in Google Analytics

Today I noticed a small change in the way Google Analytics show sampled data in one of my accounts. The well-known yellow rectangle is replaced by a permanent notice in the top right corner.

Update: This seems to be available only in accounts that contain a Google Analytics Premium property. Also, the issue is fixed an by default it takes 500,000 sessions.

Here’s how it looked before:

before1

And the slider to control the number of sessions and the precision:

before2

Now you can see for every report how many sessions were used for its calculation:

now1

And when you’re working with bigger websites and select a secondary dimension or apply an advanced segment, the data is sampled as usual:

now2

This new visualization could be easily missed without the alarming yellow color.

By default Google Analytics samples the data at 250,000 sessions, with a maximum of 500,000 sessions. I think this may be a temporary bug, but the drop-down that says Faster response, less precision and Slower response, greater precision is incorrectly marked as greater precision at 250,000 sessions:

now3

A work-around is to select Faster response, less precision first and then switch to Slower response, greater precision to get to the limit of 500,000 sessions:

now4
For specific ways to manage sampled data in Google Analytics you can check this great blog post at Luna Metrics.

Update: It seems GA fixed the issue and now you see the proper limitation for Slower response, greater precision option.

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

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

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 April – you may want to bookmark those as they can be very useful:

Statistical Significance Script for Google Analytics

It’s very common to compare two time periods of data in GA, looking for changes. It’s easy with big and noticable differences. But when there is a more subtle increase or decrease, the percentage change may not actually be statistically significant. This script from Luna Metrics evaluates the graph’s data and determine whether (and at what level) the percentage change is statistically significant. Here’s the script in action:

significance

Customer Insights With Google Analytics Demographics

In this post Scott Shannon from Cardinal Path shows the benefits of GA Demographic and Interests reports and how to use this data with specific samples for AdWords display and remarkting campaigns.

Share Your Goals in Google Analytics

Another post from Luna Metrics about the new GA feature which allows you to share your goals as template links or in the Solutions Gallery.

Understanding Cross Device Measurement and the User-ID

In this post Justin Cutroni explains how cross-device measurement in Universal Analytics works, how to implement it and what new data and reports are available.

Universal Analytics Upgrade Guide

I found this Upgrade Guide for Universal Analytics very useful! You really need to understand the complications involved in the UA upgrade, especially if you’re using a third party shopping cart which is not yet supporting the new analytics.js library. Don’t forget – once you start the upgrade, you can’t go back to Classic GA.

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