Preface

When Google launched Google Analytics in 2005, it revolutionized web analytics. Heck, it flat out turned the entire industry on its collective head. No longer was web analytics an expensive endeavor that required a substantial investment in software. Measurement tools became irrelevant from a cost perspective, and the focus started to shift to people.

In May 2007, Google gave the analytics industry another shot in the arm when it released version 2 of Analytics. The update included a progressive new interface that simplified the data presentation in hopes that more people, like marketers and PR professionals, would use the data to make business decisions.

By creating a free analytics tool that is easy to understand, Google has helped everyone become a web analyst. Website designers, webmasters, IT teams, C-level executives, and marketers are all using Google Analytics to track and measure website performance and online marketing initiatives.

Let’s face it, Google Analytics is sexy as hell right now! Everyone wants a piece of it.

Who This Book Is For

This book is for anyone thinking about using Google Analytics or actively using Google Analytics (GA). You may be an executive who’s trying to determine if Google Analytics will work for your organization. You may be a marketing team member trying to figure out how to track different types of marketing initiatives (both online and offline). You may be an IT team member tasked with implementing GA.

I believe that all of you will find something useful in this book. Throughout the book, I try to explain how Google Analytics works so you can understand the impact of various configuration choices. Remember, Google Analytics analyzes business data, which means each business will configure it differently. You need to understand what’s important for your business and configure Google Analytics accordingly.

There is no technical prerequisite for reading this book. If you have a basic understanding of the Internet, if you know what a web server is, and if you know what HTML is, you’ll understand the subject matter in this book. You may not understand some of the more advanced code samples, but I will make sure you understand the concepts and ideas behind the code.

Who This Book Is Not For

People who are very new to web analytics may have some problems with this book. There is an assumption that you have some basic web analytics knowledge. For example, you should know what a pageview, visit, and visitor are. If you don’t have a basic understanding of web analytics, you may want to use this book as a companion to a more thorough web analytics text.

What You’ll Learn

My goal in writing this book is to help people understand what Google Analytics can do and show you how to actually do it.

I’ll start by talking about your business, not about Google Analytics. Before we even touch on Google Analytics, it’s imperative to identify what you want to track on your website. If you don’t know what you want to track, you won’t know how to configure Google Analytics to track it.

Next I’ll describe how Google Analytics actually works. I’ll cover how data is collected, processed, and turned into reports. I’ll also include some information about the different data-collection mechanisms, like mobile data collection and application (app) tracking.

Understanding how the system works will provide the foundation for our configuration discussion. We’ll talk about all of the various settings you can use to control data access, manipulate data, and track goals on a website.

I’ll also spend time discussing how to track marketing campaigns. In my opinion, this is one of the most overlooked features and, when done incorrectly, can completely destroy your data. However, when it’s done correctly it can lead to a deeper understanding of your marketing initiative and analysis nirvana.

After marketing campaigns, we’ll move into advanced topics, like configuring websites that span multiple domains, collecting e-commerce data, event tracking, and custom variables. All of these features allow Google Analytics to adapt and fit the data and analysis needs of your organization. These may not be features you’re currently using, but they’ll showcase the flexibility of what Google Analytics can do.

By the end of this tour, you should be a Google Analytics guru! It’s your job to take your understanding of what Google Analytics can do for your business and implement it on your website.

Other Learning Options

There are lots of different ways to learn about web analytics and Google Analytics. Some people want to learn web analytics in detail before jumping into Google Analytics. That’s a perfectly good tactic and if you want to start that way you should explore some of the following publications:

  • Web Analytics, An Hour a Day by Avinash Kaushik (Sybex)

  • Web Analytics 2.0: The Art of Online Accountability and Science of Customer Centricity by Avinash Kaushik (Wiley)

  • Complete Web Monitoring by Alistair Croll and Sean Power (O’Reilly)

You’ll definitely want to make sure that whatever books or online documentation you use covers the most recent version of Google Analytics. Google Analytics’ perpetual evolution has unfortunately made it dangerous to use a lot of formerly great (but now dated) material—some of it works, some of it doesn’t.

If You Like (or Don’t Like) This Book

If you like (or don’t like) this book, by all means, please let people know. Amazon reviews are one popular way to share your happiness (or lack thereof), or you can leave reviews at the site for the book:

http://oreilly.com/catalog/9780596158002

There’s also a link to errata there. This gives readers a way to let us know about typos, errors, and other problems with the book. The errata will be visible on the page immediately, and we’ll confirm it after checking it out. O’Reilly can also fix errata in future printings of the book and on Safari, making for a better reader experience pretty quickly.

We hope to keep this book updated for future versions of Google Analytics, and will also incorporate suggestions and complaints into future editions.

Conventions Used in This Book

The following font conventions are used in this book:

Italic

Indicates pathnames, filenames, and program names; Internet addresses, such as domain names and URLs; and new items where they are defined

Constant width

Indicates command lines and options that should be typed verbatim; names and keywords in programs, including method names, variable names, and class names; and HTML element tags

Constant width bold

Indicates emphasis in program code lines

Constant width italic

Indicates text that should be replaced with user-supplied values

Note

This icon signifies a tip, suggestion, or general note.

Warning

This icon indicates a warning or caution.

Using Code Examples

This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Google Analytics by Justin Cutroni. Copyright 2010 O’Reilly Media, Inc., 978-0-596-15800-2.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

How to Contact Us

We have tested and verified the information in this book to the best of our ability, but you may find that features have changed (or even that we have made a few mistakes!) Please let us know about any errors you find, as well as your suggestions for future editions, by writing to:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the U.S. or Canada)
707-829-0515 (international/local)
707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:

http://oreilly.com/catalog/9780596158002

To comment or ask technical questions about this book, send email to:

For more information about our books, conferences, Resource Centers, and the O’Reilly Network, see our web site at:

http://www.oreilly.com

Safari® Books Online

Note

Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.

With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.

O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O’Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.

Acknowledgments

First and foremost, this book is dedicated to the three people who sacrificed the most: Heidi, Benton, and Avery. Thanks for giving Daddy the time to explore this amazing opportunity. And Heidi, thanks for keeping life running (as smoothly as possible) during the nights and weekends that I was holed up writing.

A huge thanks to the entire Google Analytics team: Avinash, Brett, Scott, Phil, Amy, Alex, Nick, Jeff, and the countless others, you’ve become fantastic friends over the last five years. I really appreciate the time you spend helping me learn more about GA so I can spread the word.

Another big thanks to the team at O’Reilly. Simon, Amy, and the entire crew who helped fine-tune my babble into a new version of this book. Your patience borders on insanity! Thanks for sticking by me and helping me get this out the door.

Get Google Analytics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.