Google Analytics Book: Gordon Choi's Analytics Book

Gordon Choi
Gordon Choi

My name is Gordon Choi. I’ve practically reviewed and/or implemented 100+ Google Analytics accounts for different websites. I’ve written a Google Analytics Book, “Gordon Choi’s Analytics Book”, which is mainly about how to use Google Analytics and its technical setup. I’m sharing the entire book’s content on my website.

Gordon Choi's Analytics Book Cover

Have fun learning Google Analytics!

Learn to Use Google Analytics

As the most commonly used web analytics tool, we often hear people asked “How to use Google Analytics for websites?”

To further break it down, these are the questions:

Hopefully, the above questions can be answered by this Google Analytics Book.

Google Analytics Setup Strategies

Define the strategies on how you want the user behavior data of your website to be aggregated or segmented. Your setup strategies decide how you want the data to appear in the reports.

Google Analytics has a 3-level structure with Account, Property, and View.

An example is when you’re using multiple sub-domains, then you’ll set up in multiple Properties:

  • – This sub-domain is a standard alone site for desktop users, and is set up in a single Property i.e. First Property. In this Property, all the data collected belong to, so only data of appears in the reports.
  • – This sub-domain is a standard alone site for mobile users, and is set up in a single Property i.e. Second Property. In this Property, all the data collected belong to, so only data of appears in the reports.

The second example is when you have,,, and where each sub-domain represents a country-specific site. You’ll set up a Property for each country-specific site.

But how can you aggregate all the country-specific data? You can do it by applying multiple levels of Properties.

Each Property has a unique ID in the format of UA-XXXXXXXX-Y, and comes with its own Google Analytics Tracking Code (GATC). So with the second example’s 4 country-specific site, they’ll have Property IDs like this:

  • UA-XXXXXXXX-1 for
  • UA-XXXXXXXX-2 for
  • UA-XXXXXXXX-3 for
  • UA-XXXXXXXX-4 for

Now create a 5th Property which will be the “umbrella” level of all 4 country-specific Properties. Place the GATC of the 5th Property on all pages of all 4 sites, and place each of the 1st to 4th Properties on all the pages of their own sites.

Customizing Google Analytics Data

The one major magical and powerful feature in Google Analytics is the Custom Reports. All the standard reports that are available in Google Analytics are great in which they show you the high level trending of each section (i.e. By country, by traffic source, by device, etc).

But you’ll always need more than that, and in most cases you’ll have to drill down the data with more granularity. i.e. You’ll have to segment, segment, and segment!

Google Analytics Custom Reports enable you to segment your data, and build new reports (that aren’t available to you).

There are more that can complement the Custom Reports.

Sometimes the standard dimensions and metrics provided by Google Analytics by default aren’t enough for your reporting or data segmentation. To compensate that, Google Analytics lets you create your own Custom Dimensions, Custom Metrics, and Calculated Metrics.

When you’ve created a new custom dimension, it will appear as a new second dimension in Google Analytics reports. This enables you the power to customize how you want to segment the data in your reports.

You can select two or more standard metrics from Google Analytics, and put them into a formula (with rules). A new “calculated metric” will be created based on your selected metrics and rules. In any custom reports you create, you can include your Calculated Metrics.

Problems to Google Analytics

Google Analytics free version isn’t without any problem.

Data Sampling

The first problem is data sampling in segmented data reports. Google Analytics starts displaying sampled data in reports when the data required for the specific report has exceeded the Property’s data size limit.

When data sampling happens, your reports start losing accuracy in detailed data.

An example is when there were 1,000,000 sessions in your selected date range for a report that was requested. Google Analytics would take only 100,000 sessions (10.00% of sessions) to calculate your report metrics. This will then be multiplied by 10 to achieve the totals which are the numbers that will be displayed in the reports.

So 90% data (or in many cases more than 90%) of the report is estimated numbers. That’s why you cannot expect too much accuracy from Google Analytics reports (especially segmented reports).

Experienced web analysts use Google Analytics reports when they require high level trending insights which are much more useful for online marketing strategy’s decision making.

Self Referrals

The second problem is self referral data.

When a user came to your website (e.g. from a search engine (i.e. Google), then the traffic source should report “google / organic” which means Google Organic Search.

When the traffic source reports as “”, then you know this data has been incorrectly accredited to “self referral”.

Self Referrals are mainly caused by client-side redirects or untagged web pages.

Many times an old page (URL) is replaced by a new page with a new URL, URL redirection on your website has to be implemented. One method for implementing URL redirect is by using client-side redirect. Client-side redirect doesn’t “pass” the original referral name (i.e. traffic source) to the next page. This causes Google Analytics to mistakenly pick up your website’s domain (i.e. as the referral, and then report it as the traffic source.

Untagged web pages mean when Google Analytics Tracking Codes are missing or misplaced on some of your web pages.

Gordon Choi's Analytics Book

Read all the 24 chapters of my book online i.e. right on my website. Below are the table of contents and brief introduction of each chapter. All chapters are available for free. Enjoy!


Chapter 01 - Analytics Tools include web analytics and mobile app analytics, and they may be free or paid. Examples of analytics tools: Google Analytics, Piwik (Matomo), Adobe Analytics, Open Web Analytics, etc. Analytics tools such as web analytics help you measure performance, and you can make online marketing decisions based on the data reports.


Chapter 02 - Web analytics tools track website data via JavaScript-based tracking codes. The websites may be optimized to use on desktop computers or mobile devices. Mobile app analytics tools track app data via SDKs, where the apps are installed on mobile devices.


Chapter 03 - Google Analytics is a free and an extremely powerful tool to monitor your website's data. You allow Google Analytics to properly collect data and measure users' behavior on your website by installing a JavaScript based tracking code.


Chapter 04 - Google Analytics uses a JavaScript based tracking Code/snippet to track your website's users' behavior data including Page Views, Sessions, Goals, Events, Ecommerce Transactions, and more. This tracking code must be added to each web page that requires data tracking, and can be modified depending on the actual requirements or complexity of your website.


Chapter 05 - Google Analytics reports traffic by different Traffic Channels (i.e. Direct Traffic, Search Traffic, Referral Traffic), and by different Traffic Sources, i.e. Google, Bing, Baidu, Facebook, Twitter, etc. The traffic source is the source website where a visitor came from before he/she lands on your website. A specific traffic channel consists of a group of specific traffic sources. Google and Baidu are traffic source examples that are under the search traffic channel category.


Chapter 06 - Some websites are more complicated, and will require more than the standard dimensions available in Google Analytics. Create custom dimensions and/or custom metrics in Google Analytics and use them to collect data that Google Analytics does not automatically track. You may create a new custom dimension which will then appear as a new second dimension in the reports.


Chapter 07 - Goal tracking lets you monitor users' actions on your website. Set up goals to track either purchases or registrations in Google Analytics. Goals may be destinations i.e. URLs, events, or others, and they can be event goals, pages per session goals, or session duration goals.


Chapter 08 - Ecommerce websites always need to track online transactions. Google Analytics Enhanced Ecommerce Tracking makes it possible to track the SKU, quantity, price, etc in each transaction that happened on your website. Not only transactions, but product details views, checkouts, or shopping carts can also be tracked.


Chapter 09 - Google Analytics doesn't include all the metrics you'll ever need by default, but you can create your own Calculated Metrics. New metrics such as revenue per user, transaction per user, etc, may be created with Google Analytics Calculated Metrics, and can be displayed in reports.


Chapter 10 - Google Analytics offers five built-in parameters for campaign URL tagging. Tag all your campaigns' URLs manually with the parameters, Google Analytics will report the performance data of all the tagged campaigns.


Chapter 11 - Users may visit your website from a new search engine that is unrecognized by Google Analytics. When this happens, the users' data will be reported under the wrong traffic channel category (i.e. a non-search channel). You can rectify this by defining this new search engine in Google Analytics.


Chapter 12 - You have access to many pre-built reports in Google Analytics. But often you will need new reports. An option is to create your own custom reports. Custom reports allow you to choose your data's granularity i.e. How deep you drill down the data. Data reports with more details help you better analyze your website users' behavior.


Chapter 13 - Self Referrals are mainly caused by client-side redirects or untagged web pages. When self referral data appears in the reports, your data (including traffic sources) is incorrectly reported. This ruins your work in data analysis.


Chapter 14 - Some reports display sampled data in Google Analytics when certain criteria are met. i.e. The data for extracting a report exceeds a single GA property's data size limit. When data sampling happens, your reports start losing accuracy in detailed data. Data sampling can be reduced but cannot be totally eliminated in reports.


Chapter 15 - Google Mobile App Analytics tracks user behavior data for mobile apps installed on mobile and tablet devices, which include apps running on iOS and Android operating systems.


Chapter 16 - Let's implement the Google Analytics SDK onto your iOS app. The iOS SDK implementation assumes your app's source code is written in Objective-C and you use CocoaPods to install and manage dependencies.


Chapter 17 - Let's implement the Google Analytics SDK onto your Android app. This Android SDK implementation assumes you use Android Studio and Google Play Services.


Chapter 18 - Google Analytics Reports consist of metrics and dimensions. Metrics are numbers that are used to measure characteristics of dimensions. Examples are sessions, unique users, new users, bounce rate, etc. Dimensions are the attributes of users to your website. Examples are URLs, traffic sources, geography, devices, etc.


Chapter 19 - Normally we won't use web server log file data as the main data source to build our analytics reports. But web server log file data can complement what web analytics tools may have lacked. When using web server log file, it doesn't require tracking pre-installation. Once the web server of your website goes live and is running, it automatically starts recording visitors' data.


Chapter 20 - As a modern web analyst, your role requires you to perform trend and data reporting, analyze online marketing acquisition strategies and explore new opportunities and/or new strategies, understand on-site visitor behavior and experiences, stay connected with the trends and the details. A web analyst may have to involve in all 3 phases: Data collection, data reporting, and data analysis.


Chapter 21 - Analytics tools collect user behavior data from your websites and/or mobile apps, process the collected data and present the data as reports and/or visual reports. The different types of analytics tools include web analytics, mobile app analytics, visualization reporting, heat / click map analytics, A/B testing analytics, CRM analytics, campaign tracking / analytics, web server log analytics, SEO data analytics, etc.


Chapter 22 - Most free and open source web analytics tools were developed by software developers who work on open source development projects. One of the successful open source web analytics tool is Piwik (Matomo).


Chapter 23 - Piwik consists of a software with JavaScript based tracking code. Install the software on your web server under MySQL/PHP environment. Add the tracking code to all the pages of your website. Now you can start using Piwik from its web based user interface.


Chapter 24 - Make sure your web server has the minimum requirements for running Piwik (as a software). Optimize your Piwik setup's performance including these areas: Server & RAM (hardware), load balancers, real-time reports, number of Unique URLs, PHP Caching, Crontab, etc.

About The Author: Gordon Choi

Gordon Choi has also written two other books:

  • The China Mobile SEO Book – Everyone wants traffic, especially free traffic from organic search. Learn how you can become an SEO expert, optimize your website for Chinese search engines (including Baidu), and measure performance with web analytics.
  • Mobile Website Book – Learn how to optimize your website’s performance (i.e. loading speed) for the mobile web. It’ll have a huge positive impact on your website’s SEO ranking and user experience.

Here are other resources (or guides) that was written by Gordon Choi:

  • Free Traffic Sources – More than 200 tactics revealed where you can get free traffic for your website.
  • Mobile SEO – The best practices in which you should follow when optimizing your website for higher mobile search rankings and better user experience.
  • List Building Strategies – Build your email list for long term business growth with 31 highly effective strategies.

Copyright 2016-2020