Google Analytics gotchas

Google Analytics is powerful but complex. This page documents a few concepts that can trip up a novice.

Tracking a domain

By default Google Analytics will only track a domain e.g. example.com and it will ignore subdomains e.g. www.example.com.

If you want to track an entire site regardless of subdomain (e.g. whether the site can be accessed via example.com or www.example.com or foo.example.com) then analytics must to be set to track across the primary domain and all subdomains.

In this scenario you would use example.com (without the www. subdomain) in the tracking code, as below…

Asynchronous syntax:

<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12345-1']);
_gaq.push(['_setDomainName', 'example.com']);
_gaq.push(['_trackPageview']);
</script>

Traditional (ga.js) syntax:

<script>
var pageTracker = _gat._getTracker('UA-12345-1');
pageTracker._setDomainName('example.com');
pageTracker._trackPageview();
</script>

Reference: Tracking Across a Domain and Its Subdomains

Session definition

GA ends a session via the following conditions:

  • More than 30 minutes have elapsed between pageviews for a single visitor.
  • At the end of a day.
  • When any traffic source value changes (these are the utm_* parameters that can be added to links. Btw, UTM stands for Urchin Tracking Module, the name Google gave to their tracking code).

Percent exit

%exit is the percentage of pageviews that result in an exit. For example, if you get 1000 visits (i.e. 1000 entrances hence 1000 exits) with 2000 pageviews, then the %exit is 50% and on average people view 2 pages per visit.

Visits and unique visitors

GA counts a visit and unique visitor when someone lands on the site, but continues to count only unique visitors for every page visited thereafter. So if someone visits 3 pages then visits == 1 while unique visitors == 3. This also means that some pages will have 0 visits, even if they’ve been visited!

One example of where this situation can arise is in custom reports that show the unique visitors and visits metrics against a page dimension.

Confusion here comes mainly from the terminology used. The “unique” in ‘unique visitors’ refers to the fact a visit is counted uniquely for every page, it doesn’t refer to unique people.

Personally I’d prefer to see visits called sessions.

Unique pageviews versus pageviews

Unique pageviews can be more useful than pageviews, because the latter will be counted every time the user visits (or reloads) a page. In contrast, unique pageviews only counts once for a page no matter how many times it’s visited in a session.

Filtering versus segmenting

Be careful of the difference between filters that act at the pageview level, such filtered profiles, and those that act at the visit level, such as advanced segments. If you create a filtered profile to look at one section of your site, then you will only see the pageviews for that section - the source data for the report has been filtered. However, if you create an advanced segment to look at a section (e.g. by including/excluding pages with a regexp), then you’ll see the total pageviews for any visit that includes that section - the source data has not been filtered and you’re essentially just grouping it.

E.g. You have only a single visitor who views 2 pages in section one and 4 pages in section two, resulting in 6 pageviews. A filtered profile looking at only section one would show 2 pageviews. An advanced segment looking at section one could show 6 pageviews, because the visitor also viewed section two during their visit.

This does not imply that advanced segments are useless for segmenting content - they’re not. Even though you’ll not get accurate figures for the views of each section they are still perfectly good for making comparisons.

Data can not be reset

Data can not be reset. This means that if you make any mistakes with your custom tracking (e.g. custom events or variables) or you make changes to your site without noting what changes were made (hence loosing the ability to determine how they effect analytics) then your standard report will show these mistakes and there’s nothing you can do about it.

The only solution I know of is to select date ranges for which you are absolutely sure everything was correct. Or delete your profile and create a new one, which will of course result in you loosing all old data.

References

Last modified: 04/05/2012 Tags:

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top