Custom variables in google analytics allow customisable segmentation of your website visitors. It is because of this that they are one of the most valuable analytical tools available to a web analyst. This post aims to give an overview of custom variables and how they can be used, there will be a follow up post on implementation and how the code works.
For example, placing a custom variable on the login page for existing customers will allow you to separate out existing customers and consider them as a completely different user segment. No more skewing your new customer acquisition rates with existing customer data.
In the free version of google analytics you can only define 5 custom variables at one time. This number is increased to 50 in the premium version of google analytics.
A custom variable works by placing a cookie on the visitors computer when they complete a specific action on your site. This cookie can be set to expire when the visitor leaves the current page, when they close their browser or never (actually 2 years).
By setting it two to years, we know that visitor has completed our action on a previous visit even if they don’t complete it again on this visit. Going back to the existing customers example: if we set that cookie to expire in 2 years, we know that visitor is an existing customer, even if they don’t log in again on their next visit.
The 2 year cookie is by far the most powerful segmentation feature available in google analytics. Every time that visitor comes to our site we know they have completed our action on a previous visit.
Some example uses of custom variables:
- existing customer login vs not logged in
- database integration – give the visitor a unique ID in the custom var and pass that to your database
- getting a quote – if a visitor gets a quote on a specific product we can then see if they ever come back to purchase that product