Google Analytics Custom Variables Overview

October 20, 2009 by Justin Cutroni

Today Google releases Custom Variables (cv for short) in Google Analytics. This is an evolution of the custom segmentation feature. This post is meant to give you an overview of the feature. We’ll discuss how to use it in a later post.

Like Custom Segmentation, custom variables are a flexible way to add more information to Google Analytics. The big difference is that you can create LOTS of custom variables. How many? In theory you can set an infinite number of custom variables. But GA has some internal limits that keep you to 50,000.

What can we use custom variables for? The possibilities are endless:

  • Segmenting members from non-members
  • Segmenting customers from non-customers
  • Tracking all the campaigns a visitor sees prior to converting
  • Content categorization
  • Segmenting visitors based on landing page
  • Visitor segmentation based on demographic info
  • Customer segmentation based on order history

Google Analytics Custom Variables are like data decorations!

As my friend Phil likes to say, custom variables are decorations that you hang on your data. Almost like holiday decorations hanging on a tree! This is a really good analogy that I’ll continue in this post.

There are four critical attributes of a custom variable that we must understand in order to use them.

Name and Value

The easiest attributes to understand are Name and Value. The Name of a custom variable is literally the name you give to the variable. Each variable can have many, many values. For example, you could define a variable named ‘Baseball Team’ and then add the values:

  • Red Sox
  • Yankees
  • Phillies
  • Giants
  • Angels

This is totally different than the old Custom Segmentation feature. With Custom Segmentation you were limited to one variable (ie one Name) that could contain multiple values. Now you can create multiple variables each of which can have multiple values.

You can view all of your variable names in the new Custom Variables report.

Google Analytics Custom Variables Report

It’s important to note that the name of a variable, plus the value for a variable must be less than 64 characters. Why? The data is sent to Google via a request for an image file. The actual length of the request is limited and Google wants to insure that all of the data makes it to the server.

Scope

Google Analytics custom variables depends on the scope of the variable.

The real power of custom variables comes with something called the Scope. Think of scope as the different ‘levels’ of visitor data. When a visitor visits a website Google Analytics collects data at three levels:

  • Pageview level: This is data associated with each page viewed during a visits. Page level data can change from one page to the next.
  • Visit level: This is data associated with the visitor’s entire visit. This data can change from one visit to the next. But visit level data is applied to every page within a visit. This data only exists for the CURRENT visits.
  • Visitor Level: This data is applied to the visitor and every visit and every pageview that the visitor generates. This data persists across all visits that a person creates. How does it persist? Via a cookie.

This means we can set information, ie custom variables, at the page level, the visit level and the visitor level. If we think of custom variables as decorations “hanging” on our data then we could use the following graphic:

GA Custom Variables "hanging" on your data.

So scope is the same as level. Anyone drooling out there?

The ability to control the scope of a custom variable makes this feature extremely flexible. For example, if you want to group all of the content on your site you can add a page level custom variable to every page that identifies the groups that a page belongs to.

If you want to segment visitors by their purchase history you can add visitor level custom variable. The possibilities are truly endless.

Let’s take a look at some of the reporting so you can get a feel for some of the data.

Here’s the Custom Variables report. You’ll notice it looks a lot like the user defined report. This report contains all of the variables that you defined. If you click on a variable you’ll see all of the VALUES for that variable.

So why has google added a scope if we can’t see it in the reports? I’m just going to let you guys speculate. But it’s obviously a critical part of CVs and we should see that data.

Index

The last attribute that we need to discuss is something called the Index. To be honest, it’s really hard to define the index. Basically the index is a technical attribute that helps GA organize all the custom variables on a page.

It’s only used during the implementation, so we’re not going to dig any further in this post.

Speaking of the implementation, you’ve probably noticed that I haven’t talked much about the implementation. To be honest, we’re still playing with CVs. Obviously this data comes from JavaScript. So you have to do some coding to get this data.

But I’m going to hold off on the implementation talk until later. Implementation involves another concept called the Index which is, to be honest, vague and confusing.

Share:
  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
  • Facebook
  • SphereIt
  • TwitThis
  • Yahoo! Buzz
Subscribe:
  1. 4 Responses to “Google Analytics Custom Variables Overview”

  2. Justin,
    This is the best explanation for CVs I read, And oh boy did I read…
    Looking forward to reading some implementation examples…
    Ophir

    By Ophir on Nov 22, 2009

  1. 3 Trackback(s)

  2. Oct 20, 2009: Analytics Talk » Blog Archive » Introducing Google Analytics v4
  3. Oct 21, 2009: Lecturas sobre la nueva release de Google Analytics | Trucos Google Analytics
  4. Oct 23, 2009: GAAC Summit – shrnutí « Adaptive Mind

Post a Comment