Digital Business Marketing
Analytics

A Practical Guide to Google Analytics

How Google Analytics worked in 2011, from the async tracking code and cookies to goals, filters and sampling, and what that meant for your numbers.

By / Published / Updated

From the archive series: this article looks back at digital marketing as it stood in 2011. Tools, prices and platform rules described here reflect that period.

Featured image for “A Practical Guide to Google Analytics”: Google Analytics

Google Analytics started life as Urchin, a web analytics company Google bought in 2005 and turned into a free product later that year. Six years on it sits on a huge share of business websites, and in March Google started rolling out a redesigned interface in beta. The new look is getting most of the attention, but the numbers you see still come from the same machinery underneath. If you understand that machinery, most of the strange things in your reports start to make sense.

How a visit gets counted

Every page carries a short JavaScript snippet. Since late 2009 the recommended version is the asynchronous one, which loads without holding up the rest of the page. When a page loads, the script sets a handful of first-party cookies on the visitor’s browser and sends a request to Google with details about the page and the visit.

Those cookies do most of the work. One identifies the browser so a return visit can be recognized. Another stores where the visitor came from: a search engine, a referring site or a tagged campaign. That source cookie is overwritten whenever the visitor arrives through a new non-direct source, so by default the sale goes to the last campaign or referrer before it. Someone who found you through a newsletter and came back a week later by typing your address still gets credited to the newsletter. Someone who found you through the newsletter and then clicked a paid ad gets credited to the ad.

Why some numbers look odd

Time on site is calculated from the gaps between pageviews. The script has no way of knowing when someone closes the last page, so a visitor who reads one article for ten minutes and leaves shows up as a bounce with zero time on site. That’s why a blog full of long, well-read posts can still report a high bounce rate and short visits.

Delete your cookies or switch browsers and you become a new visitor. Visit from your phone and your laptop and you’re two people. Treat visitor counts as a count of browsers, which is what they really are.

Set up goals and tag your campaigns

A report that only shows visits can’t tell you whether marketing is working. Goals fix that. You can define up to 20 per profile, usually a thank-you page after a purchase, a form or a signup. Once goals exist, every traffic source in your reports shows a conversion rate next to it.

Campaign tagging is the other half. Add utm_source, utm_medium and utm_campaign parameters to the links in your emails, banners and partner placements (Google’s URL Builder does this for you). Untagged email clicks often show up as direct traffic, which makes your best channel look like it does nothing.

Filters and sampling

Filters let you exclude your own office traffic or tidy up messy URLs, but they change data permanently as it comes in and can’t be undone later. Keep one profile with no filters at all as a safety copy, then apply filters to a second one.

Sampling catches people out too. The standard reports are precalculated, but when you apply an advanced segment or a custom report to a date range with more than 500,000 visits, Google analyzes a sample and scales it up. A notice at the top of the report tells you when this happens. For large sites the fix is a shorter date range.

Getting more out of it

The Data Export API, available since 2009, lets you pull report data into a spreadsheet or your own tools, and scheduled email reports keep the key numbers in front of people who won’t log in. The new Site Speed report added in May is worth a look as well, since slow pages quietly drag down conversion rates.

None of this needs a big budget. Install the snippet on every page, define your goals, tag every campaign link and keep an unfiltered profile. That covers most of what businesses get wrong with Google Analytics, and the reports become something you can actually make decisions from.

Newsletter

The marketing brief, every week

One email a week: the sharpest new guides, tool reviews and Awards updates. No fluff, unsubscribe anytime.

We respect your inbox. Read our approach.

Keep reading

Related articles

All Analytics →

Explore more topics