Creative Commons LicenseThe following “Free Hacks” and file downloads by Brian Clifton are licensed under a Creative Commons Attribution 3.0 Unported License. These are provided  free of charge, and so no responsibility for errors or any other complications arising from the use of this code is taken by the author (though of course, if you let me know of any problems I will try to help…

[ If you are looking for async code, go get the latest Google Analytics plugins. ]

Free Hacks for ga.js (non-async code):

  1. Combined tracking script (blog post )
    • Tracks outgoing links – Automatically
    • Tracks file downloads – Automatically
    • Tracks mailto links – Automatically
  2. Customising the list of recognised search engines (blog post )
    • Adds 100+ regional search engines for detection as a search engine (rather than listed as a referrer)
    • Differentiates regional variations e.g. google.co.uk, google.com, msn.se etc.
    • Tracks Google Local (maps.google.com)
    • Tracks bing.com (see post )

Free Hacks for urchin.js (legacy tracking code):

  1. Combined tracking script (blog post )
    • Tracks outgoing links – Automatically
    • Tracks file downloads – Automatically
    • Tracks mailto links – Automatically
  2. Customising the list of recognised search engines (blog post )
    • Adds 100+ regional search engines for detection as a search engine (rather than listed as a referrer)
    • Differentiates regional variations e.g. google.co.uk, google.com, msn.se etc.
    • Tracks Google Local (maps.google.com)
    • Tracks bing.com (see post )
  3. Track outgoing links – Automatically now deprecated – use combined tracking script above (related post)

 

Book specific code

Second edition:
Use the Pro Lounge for all coding examples along with other goodies :)

First edition:
No book can be perfect, so also check the list of Google Analytics book errata for corrections and typos .

  1. Chapter 1: Table 1.2: Economic effect of increasing your conversion rate.xls
  2. Chapter 9: page 180: Differentiating Regional Search Engines
  3. Chapter 9: page 205: Capturing the first-and-last-referrer.txt
  4. Chapter 10: Figure 10.1: KPI-example-spreadsheet.xls
  5. Chapter 11: Figure 11.8 - cpcmax-calculator.xls