Google Analytics

A Guide of Epic Proportions

Who is this guide for?Anyone looking to wrap their head around GA and its many capabilities.

This guide is meant to educate and serve as a resource on a range of Google Analytics topics, from types of tracking to what exactly is being calculated. We’ll even cover some common issues seen recently. So either start at the top and read the whole post or click on a specific topic and just read that section if you prefer. Enjoy!

What is Google Analytics?

Google Analytics is a digital analytics solution that collects data about your digital presence. How does it do this? Well at a high level you need to add the small snippet of code that contains your Unique ID pertaining to your specific GA property (UA-XXXXXX-X) on all your pages. This code collects information and sends it to the Analytics servers by attaching parameters to a single-pixel GIF image request.

Types of Tracking

Mobile App vs Website Tracking

Mobile apps are not built with the same technology as websites. For this reason mobile app tracking collects data differently than website tracking. Website tracking uses JavaScript to collect data and sends it to Google’s servers as a hit. Mobile apps do not use JavaScript, instead they use an SDK (Software Development Kit) dependent on the specific operating system (different SDKs for Android vs iOS).

Mobile app data is also sent in a different manner to Google’s servers than website tracking. The process in which mobile app data is sent is called Dispatching. This means that the hits are stored locally on the device using the mobile app and then sent to the servers later. Why you ask? Because, mobile devices are prone to losing their network connections and if it was sent in real time Google mentions it can reduce a device’s battery life. So when does dispatching occur? For Android devices it is every 30 minutes and for iOS devices it is every 2 minutes.

Universal, Asynchronous & Traditional

There are 3 types of tracking codes that you may see out in the wild:

Traditional Analytics

I rarely see Traditional Analytics on the web any more, BUT it still exists on some sites. This tracking code would collect data after the content for a page had finished loading, not good for when a user comes to your site and leaves before the page loads.

This code looks like:

Asynchronous Analytics

After Traditional came Asynchronous Analytics. This allowed for the code snippet to load the tracking code in parallel with other scripts on the page. This update made for faster tracking code load times, enhanced data collection and eliminated the amount of tracking errors when JavaScript hadn’t fully loaded.

This code looks like:

Universal Analytics

This is the most recent tracking code and Google’s new standard. All users will eventually be migrated to Universal Analytics whether they want to or not.

This code looks like:

Universal Analytics vs Asynchronous

Universal Analytics is different from Asynchronous in that it is moving from being visit-centric to being user-centric analytics. Universal Analytics has also simplified changing server configurations (Organic Search Sources, Session and Campaign Timeout Handling, Referral Exclusions and Search Term Exclusions) by providing easy controls in the account Admin panel which doesn’t require you to edit any of the existing tracking code on every page of your website. In addition, Custom Variables are now Custom Dimensions within Universal and the cookie tracking has been updated.

Code Placement

Traditional Code
Before the closing body tag
Asynchronous Code (ga.js or dc.js)
Immediately before the closing head tag
Universal Analytics (analytics.js)
Immediately before the closing head tag
Google Tag Manager Code to Deploy Analytics
Immediately after the opening body tag (I have heard if you take out the noscript element of the Container code it can be placed anywhere but have not implemented this myself)

Google Analytics uses first-party cookies.

Asynchronous Analytics used up to 4 cookies to collect visitors usage data.Remember cookie Expiration Times are updated every time a hit is sent to GA.

_utma
Used to distinguish users and sessions. Default expiration time: 2 years
_utmb
Used to determine NEW sessions/visits. Default expiration time: 30 minutes
_utmz
Stores the traffic source or campaign. Default expiration time: 6 months
_utmv
Stores visitor-level custom variable data. Default expiration time: 2 years

Universal Analytics only uses one cookie and the expiration is refreshed every time a hit is sent.

_ga
Used to distinguish users
Default Expiration Time: 2 years
The equivalent of _utmb in Universal would be changed by going to Admin > Tracking Info > Session Settings > Session Timeout
The equivalent of _utmz in Universal would be changed by going to Admin > Tracking Info > Session Settings > Campaign Timeout
Like this? Sign up to read more

Basic Setup

Account Structure

Account Structure

Account
How you log into GA or if you are an agency and have multiple Accounts it is the topmost level.
Property
The site, mobile application, etc
View (Previously called Profiles)
View of data and access point for reports*
Users
Who can login to view/edit either at the Account, Property and/or View levels. You can grant 4 types of User permission: Manage Users, Edit, Collaborate and Read & Analyze. User permission can be adjusted by going to Admin > User Management.

* TIP: Have a Raw /Master View that contains no filters, otherwise you will only have Views that exclude or alter your data in some way.

Example Account Layout

Standard Reports

Standard Reports

Google Analytics is all about speed and they want to make sure you get your data as fast as possible. GA collects data, calculates it and stores this data in aggregated tables. These tables are what make up your Standard Reports and retrieve your data request without sampling. The Standard Reports in GA are:

Dashboards
Customized overviews. You can create up to 20 dashboards each with up to 12 widgets. Each Dashboard is only available in the View it was created in unless shared.
Shortcuts
Remembers your settings and configurations for a report. These are visible only to the User that creates it unless shared.
Intelligence Events
Automatic & Custom Alerts
Real-Time
Monitor activity in real-time or last 30 minutes. TIP: Real-Time reports don’t display widened dimensions
Audience
What visitors came to your site
Acquisition
How visitors came to your site
Behavior
What visitors viewed & did on your site
Conversions
Goal and eCommerce information

What Are We Tracking?

Dimensions vs Metrics

Dimensions: Describe Data

Thinking the “what” (what keyword did they use, what city is the visitor from)

Ex: Source/Medium, Browser, Exit Page, Session Duration

Metrics: Measure Data

Think of it as answering “how many” or “how long” (how many sessions)

Ex: Sessions, Screenviews, Bounce Rate, New Users

 

Google’s Dimensions & Metrics Reference Page

Sessions

Group of interactions that take place on your website within a given time frame.

What ends a session?

  • 30 minutes of inactivity
  • At midnight
  • Campaign change: a user arrives via 1 campaign, leaves and then comes back via a different campaign.

Average Sessions Duration

Total duration of all sessions (in seconds) / # of sessions

N.b. does not include time on last page of visit unless there is an additional engagement hit

Here is an example from Google on what this looks like:

Avg Session Duration

Events vs Pages

Pageviews

Triggered by URL (or Virtual Pageview)

Events

Triggered by interaction

“Difference between events and conversion goals is that events are typically tied to website elements and not reaching certain pages (or URL destinations). Events can be used to track things like buttons, PDF downloads, clicking the play button in a video, etc.”

Exit Rate vs Bounce Rate

Bounce Rate
% of sessions in which the person left your site from the entrance page without interacting with the page.
Exit Rate (%Exit)
# of Exits / # of Pageviews

“For all pageviews to the page, the exit rate is the percentage that were the last in the session.
For all sessions that start with the page, bounce rate is the percentage that were the only one of the session.
The bounce rate calculation for a page is based only on sessions that start with that page.”

Google provides a great example of this:

Exit Rate vs Bounce Rate

Improving GA

Event Tracking Structure

Do you have a process set in place for your Event Tracking? A lot of sites don’t and also don’t realize how this can be hurting their analysis. If you go to Behavior > Events > Top Events you will be able to see a list of Event Categories(if you have implemented Event Tracking). Event Tracking with Asynchronous Analytics (ga.js or dc.js) has 5 fields:

  • Category (required)
  • Action (required)
  • Label (optional)
  • Value (optional)
  • Non-interaction (optional)

Event tracking with Universal Analytics (analytics.js) has 4 fields:

  • Category (required)
  • Action (required)
  • Label (optional)
  • Value (optional)
Event Tracking

Issues occur when no structure is in place for your Event Tracking. Common issues I see are non-descriptive fields, duplication errors, Category and Label named the same. On the left you can see an example of what Event Tracking can look like if you have no structure.

Notice how capitalization is a huge issue above? There is a category for “download, Download and Downloads”. This means that we are not getting a holistic view of how all Downloads are actually performing. My recommendation is to create some type of structure for your Event Tracking.

Also keep in mind that when you use an underscore to combine words GA sees that as 1 word vs using a – which GA sees as individual words. For example, lets say you define a Category as ‘Download_link_here’ and another Category as ‘Download-link-here’. If you use the search feature in the GA interface and search for ‘here’ only ‘Download-link-here’ would show up as GA sees ‘Download_link_here’ as 1 word.

The easiest way to solve these is to create an excel document like the one below:

Excel Event Tracking
Like this? Sign up to read more

Goals & Goal Values

If you can identify an expected path to your Destination goal, you should create a funnel for that goal.

Benefits of Funnels: it demonstrates drop-off in the Funnel Goals and Funnels Visualization report, and it allows Google Analytics to calculate an Abandonment Rate (and a specific Funnel Conversion Rate).

Even for non-monetized goals, specifying an arbitrary goal value such as $1 allows Google Analytics to calculate the Page Value metric (goal value + Ecommerce revenue generated after the page was viewed unique pageviews).

N.b. Goals are not retroactive.

Goal Abandonment Rate

“Abandonment Rate strictly refers to the percentage of visits during which the visitor entered your funnel (at the first step, if you specified this as required, or otherwise at any step) but did not reach the goal destination.”

You cannot apply advanced segments to the Funnel Visualization report. To generate a funnel for different audience segments, you can create separate views with filters that match to your advanced segment definitions.

Custom Campaign Tagging

As we have mentioned throughout this post Google does not know everything and needs a little bit of help from us, this is especially true when it comes to campaign tagging. Google Analytics can’t always determine which medium drove traffic or what you want it to be.

What does tagging look like?

Tagging looks like

What it can look like when you don’t utilize custom tagging properly

Custom Campaign Tagging

Google provides a URL builder to help customize your campaign URLs. There is also the URL builder extension I mention in the Tools section. TIP: (none) is different than (not set). (none) indicates the url was not tagged at all. (not set) indicates an issue with the tagging or loading the parameters.

Default Channel Groupings

Under Acquisition > Channels you will notice the primary dimension is set to Default Channel Grouping. This is Google defining your channels by default with their own set of rules. Here is the list of how Google defines each channel.

Default Channel Groupings may not accurately define your data and you may need to Define a new channel like ‘Affiliate’ or you may need to add to some of the Default channel settings. If you go to Admin > Channel Grouping you will see a list of the Channel Definitions for your site. You are able to add to the System defined definitions to ensure this data is accurately attributing your channels appropriately. N.b.: The order of your rules matters.

Content Groupings

Content Groupings allow you to group and categorize content together based on rules you define. There are 3 methods for how you can assign content:

Group by Tracking Code (modify the tracking code on each web page:
Add a single line of code that identifies the content index number and the Content Group to which that content belongs.
Group Using Extraction (extract content based on URL or page title)
Use a regular expression to identify a full or partial URL, page title, or screen name.
Group Using Rule Definitions:
Use the rules editor to create simple rules to identify content.

Justin Cutroni has a nice post that goes in to these methods in even greater detail.

N.b. Content Groupings are not retroactive and can be created at the View level in Admin > Specific View > Content Grouping. You can create up to 5 Content Groupings.

Like this? Sign up to read more

Frequent Issues with Google Analytics

Screaming Frog

Missing Tracking Code

Check for is if the tracking code is on the actual page. You would be surprised how many times websites are only partially coded. You can easily check your website for specific pieces of the GA or GTM tracking code by running a custom filter configuration with Screaming Frog.

Duplicate Reporting

These do not FIX duplication related to SEO, these are simply ways to consolidate these issues from a reporting standpoint only.

Use Exclude URL Query Parameters to further consolidate URLs

Ex: you have the userid parameter in URLs that doesn’t determine significantly different page content then you should probably include userid in Exclude URL Query Parameters. This way Google Analytics won’t record a separate URL for each user who accesses the account page. This consolidates the URL variations rather than excluding them. Enter as a comma-separated list for multiple parameters.

/ & /index.html

Define the Default page in Admin > View Settings. For example, if www.example.com loads your index.html web page, enter index.html in this field.

Lowercase Filter

Uppercase and Lowercase

Create a Filter to Lowercase the Request URI. Otherwise you may have traffic come in as separate URLs when casing is not specified (ie: /home.html and /HOME.html will render as 2 different pages).

Mixing dc.js & ga.js

Installing multiple instances of the Asynchronous Google Analytics Tracking code on a single web page, especially different versions of the code, is not a supported implementation. You should not have part of your site tagged with dc.js and the rest with ga.js.

Incorrect Search & Replace Filters

I have many clients come to me asking me why GA is bringing in traffic for pages that do not exist nor did they ever exist on their site. If this is happening to you the first place I would check is Admin > Filters and look for something that looks like this:

Search and Replace

The Search and Replace filter finds whatever Search String you define (regular expressions are a good way to do this) and replaces that string with the Replace String you define. I have seen this trip up many people, especially when a sub-domain has Search and Replace applied and that sub-domain now shows up as a different hostname. (ie: you have zzz.site.com and create a Search and Replace filter with Filter Field: Request URL, Search String: /http://zzz.site.com and Replace String: /zzz-site-com/. This means that traffic from zzz.site.com will come in to GA as www.site.com/zzz-site-com/.)

Understanding the Direct Attribution

Reason “last interaction” reports may be reporting less revenue than what is attributed under “All Traffic”:

MCF reports show assisted conversions and last click or direct conversions (which is where the Social > Conversions > Assisted vs. Last Interaction Analysis comes from).

MCF Report:
Direct Traffic that converts is attributed to the “direct” channel.
Other GA Reports:
The Direct Traffic conversion is attributed to the previous non-direct campaign or source.

For example, in the other Google Analytics reports, if a user enters your site via a referral, then returns ‘direct’ to convert, the ‘direct’ source is ignored. Instead, the referral gets credit for the conversion. In MCFs, the ‘direct’ source is not ignored. ‘Direct’ gets credit as the last interaction before the conversion, and the referral is counted as an assist interaction.

Help Yourself

Annotations

Want to make your life easier? Use annotations! I annotate like crazy, there is no way I am going to remember the exact day a robots.txt file was updated for every client, or possibly when a new interactive launched (my memory is not THAT good). This is such an easy way to look at your data and attribute what may have been the cause of a spike or decline.

TIP: If you create an annotation in one view it will not show up in another so be consistent and know which view you are placing your annotations in.

Create New Annotation
Custom Alerts

Custom Alerts

To get custom alerts about your account simply go to Admin > Personal Tools & Assets > Custom Alerts and click “+NEW ALERT”. You can have these custom alerts sent to you via email or you can receive a text message notification.

Sample Custom Alerts:

  • Bounce Rate – is greater than x%
  • Sessions – is less than 1
  • Goal Conversions – Increase or Decrease [x% or x] from previous day/week
  • Sessions from [Medium, Source,etc] – Increase or Decrease [x% or x] from previous day/week

Resources

Tools

Analytics Helper

Analytics Helper – This extension detects if Google Analytics script is installed on whatever page you are on, the type of tracking used and if the code is before the closing head tag.

Google Tag Assistant

TIP: This will not detect the code if you are using Google Tag Manager(GTM) use Tag Assistant I mention below for that.

Google Tag Assistant – This extension troubleshoots the various tags implemented on a page. This extends outside of just GA and includes GTM, Adwords Conversion Tracking and more. It also provides you with a multitude of information about Google Analytics Errors that might be present on your page, a list of some of these errors is provided by Google.

EditThisCookie – This extension is a simple cookie manager. I use it when I want to easily analyze how cookies are rendering across a site, it is also a much easier way to delete your cookies quickly.

EditThisCookie
GA Debugger

GA Debugger – This extension inspects the information in the GIF request that gets sent to GA and displays it in your JavaScript console in a readable and easy to digest manner vs looking at the entire _utm.gif request. I use this ALL the time, whether it is to see how my cookies are being transferred and sessions reset or not or to see how specific event tracking is firing. Once installed on a PC hit CTRL+SHIFT+J to bring up the console (on a MAC hit COMMAND+OPTION+J).

TIP: Edit This Cookie is beta testing their DevTools panel only accessible in Chrome.

Some additional tools:

Like this? Sign up to read more


Kaitlin Ziessler

Kaitlin was introduced to the world of technical SEO and analytics in early 2011. Starting her journey in Atlanta, moving on to Philly and is now in beautiful San Francisco.

Kaitlin has pretty nerdy tendencies. Don't ever ask her to cook for you because she will probably just order in. And whatever she gets, she will probably cover it in ranch. If you see her around town, just shout "Larry", "Gary", "Terry", or anything along those lines and she will probably answer!


Get in touch for more information

Contact