Create a segment for traffic from a campaign

A common requirement in Google Analytics is to analyse the effectiveness of a campaign. One of the most powerful approaches to this is to create a segment for the campaign. This enables you to see all the reports and analyse the campaign by volume of traffic, behaviour of users once they get to the site, Read more about Create a segment for traffic from a campaign[…]

7 easy ways to screw up your Google Analytics data

1. Don’t actively maintain your Exclude URL query parameters list Google has this view setting as ‘optional’ but if you don’t set it up correctly and maintain it, then you can make a real mess of your data. The setting tells GA whether to treat each value of the query string parameter as a separate Read more about 7 easy ways to screw up your Google Analytics data[…]

Track and measure scrolling

Update: there is a new lighter-weight version of the scroll tracking code here. The older version here has the advantage of automatically adapting to changes in page height if the browser window is resized or new content loads. However, I have had one report of this causing jittery scrolling, the lighter weight version is designed Read more about Track and measure scrolling[…]

Visit durations normally distributed? Not likely.

Time on site is an incredibly useful metric, but fraught with difficulties of collection and interpretation. For example Google’s presentation in the behaviour/engagement reports, at first glance, makes visit duration look normally distributed, but they aren’t.
Using the analytics API in a spreadsheet enables a much closer look at the distribution of visit lengths.

Pull Google Analytics data into a Google Docs spreadsheet using the API

Update: a better solution

Google now presents an inbuilt library for accessing Google analytics from Google docs. You can see how to use it with a ready-made and powerful solution for template driven analytics reports and dashboards here.

This post is left here in case it is of interest to anyone. However, this is no longer the best way of accessing the Google Analytics API from Google Docs. Google have made an interface available directly within docs script, as described in the Google Analytics blog.

The Google Analytics Reporting API enables you to automate reporting tasks, combine GA data with other information, apply analysis and visualisation tools, and access data you couldn’t easily reach via the Google Analytics UI.

As well as reducing repetitive work, this reduces your chance of errors, and enables you to build up more sophisticated analysis.