Monday, 17 November 2008

Google Analytics baseline setup

This is going to be a longer post where I'll explain what Moneyspyder does to clients to help them attain what we consider to be the bare minimum Google Analytics setup.

GA (Google Analytics) is really easy to get up and running but it's not so obvious what should be done to start getting the best out of it (see a previous post on why quality data is essential).

Default profile
Having initially setup GA you are the proud owner of one single, unfiltered, raw profile. This profile will capture all the data sent to it by your website traffic.

Notice the two links highlighted above - these two little chaps are going to help a lot: Profiles and Filters.

First of all, let's get our raw profile sorted out:

  • e-commerce tracking

  • search tracking

  • filter internal traffic

  • lower case data

Standard Profile Edits

First of all, click 'edit' next to your standard profile :

Then click 'edit' again in the top right:

Now, if you site is a transactional site you'll want to track the e-commerce data generated by your site so click the 'Yes, an e-commerce Site' radio button.

Likewise, if your site has internal search you'll want to track it so click on the 'Do Track Site Search' radio button:

Having clicked the relevant controls, be sure to tell Google what currency you're using and what search parameters to look out for. Say your site uses a parameter 'q' on the url for searches:

Then type 'q' in the Query Parameter box.

Now 'Save Changes'.

Standard Filters

Now head back to the Analytics Settings page for your site. Click on 'Filter Manager' (bottom right), and then click 'Add Filter' (top right):

Here is a filter to turn all data into lower case:

Notice that the filter name is totally up to you. Choose custom filter, lowercase, Request URI and add your single profile to the 'Selected Website Profiles' list. Now 'Save Changes' and all your data will be lower case. This is results in nice consistent case in your data - shouldn't be necessary but say users search for 'Widgets' and 'widgets' - you'll see the data for the two search terms as one which is more useful.

Now, one more standard filter:

This filter will exclude your internal traffic from your data. Obviously you'll need to change the regular expression to match your IP address range. You can exclude multiple ranges or single addresses - if you can build the reg exp (perhaps using Rubular which is a neat tool) you can filter the addresses out.


We normally apply these two standard filters to all profiles but when you start building more advanced custom filters you will need to think carefully as to whether you want to apply these filters to your standard profile or another specific profile. Filtered data can never be retrieved. Once it's filtered, it's gone. If you apply a filter by mistake, you can create holes in your data. This is to be avoided so be careful!

Now, time for some

Advanced filters and extra profiles

We suggest starting with 4 extra profiles covering the basic customer segments:

  • New

  • Returning

  • Organic

  • Paid

As you will see, the filters that can be applied can get quite 'fruity'. Depending on your Key Performance Indicators you may choose to add or remove filters that are better aligned with your website strategy so as to measure your tactical goals more accurately.

Let's setup the profiles first of all:

Click 'Add Website Profile' in the bottom left of the Analytics Settings page for your site in GA.

Choosing to add a new profile for an existing domain will create another profile that will receive data from your website. No new GA tracking codes or scripts are required. Slightly off topic though: Make sure your test, staging and production sites all have separate Ga accounts - keep the data clean!

Give it an appropriate name of course...

Now repeat for the other profiles and you'll end up here:

Don't be concerned by the this will change in a few hours. New profiles, even though they may be using an existing URL, are new profiles. they do not have data, they are not copies of existing profiles.

Remember the standard filters and profile tweaks. Do them to these new profiles. Make them all track search if your main unfiltered profile tracks search and likewise for e-commerce.

Now we need to filter the data going in to these profiles. We shall set up the New Visitors filter first and apply it to the New Visitors Profile.

Go into 'Filter Manager' and create a new filter:

You'll notice some similarity with the 'Lowercase' filter. It's a custom filter again. This time we 'include' traffic based on 'Visitor Type' being 'new'. We apply this filter to the New Visitors profile ONLY!!!!

Now let's do the same for returning visitors:

Cool! Now we have an unfiltered profile albeit with slightly filtered (for cleaning purposes) data, and two corresponding profiles containing data pertaining only to New Visitors and Returning Visitors. Already we have better visibility of our two main customer types and what they are doing on our site.

Now the home stretch (for now) where we can create another two customer filters to capture two more really useful segments - organic traffic and paid traffic:

take a moment to browse through the filter fields available - awesome huh? You're probably thinking already how you could use some of these fields for future profiles and filters. I am!

Now you should end up with a list of filters like this:

take a moment to double check your profiles to make sure you have the right filters on the right profiles - always worth performing a gross error check at this point cos now you have to wait for the data to come flying in!

Couple these basic segments (filtered profiles) with the new GA custom segments and reports and you start to see how powerful clean data can be.