0% found this document useful (0 votes)
125 views

Google Analytics Advanced Course

Google Analytics collects data through a tracking code installed on web pages. This code sends "hits" with information about user interactions to Google Analytics. Hits are categorized into users, sessions, and joined with other data sources. Key points are: - Tracking code sends hits with data like language, page viewed upon user interactions. - Hits are used to differentiate new vs returning users and organize into sessions based on 30 minutes of inactivity. - Data is joined with information from IP addresses, server logs, and other sources to provide additional context.

Uploaded by

Sonia Fodor
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views

Google Analytics Advanced Course

Google Analytics collects data through a tracking code installed on web pages. This code sends "hits" with information about user interactions to Google Analytics. Hits are categorized into users, sessions, and joined with other data sources. Key points are: - Tracking code sends hits with data like language, page viewed upon user interactions. - Hits are used to differentiate new vs returning users and organize into sessions based on 30 minutes of inactivity. - Data is joined with information from IP addresses, server logs, and other sources to provide additional context.

Uploaded by

Sonia Fodor
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

GOOGLE ANALYTICS ADVANCED COURSE

1. Data Collection and Processing

1.1 Google Analytics data collection

Introduction

Hi, I’m Justin Cutroni. And I’m Krista Seiden. We’re Analytics Advocates at Google. Welcome to
Advanced Google Analytics. If you’ve already taken our course Google Analytics for Beginners,
you should be well prepared to take this next step in your understanding of Analytics.

Website data collection

Let’s start by showing you some specifics on how Google Analytics collects data. Remember
that website data collection begins with a snippet of JavaScript tracking code that’s included on
every web page of the site where you want to collect data. The goal of the tracking code is to
track each user interaction that occurs on your website. These interactions can be as simple as
loading a page or something more specific like clicking a video play button or a link.
The Analytics tracking code uses the domain of the website you are tracking to define it as a
“site” in your reports. With the tracking code installed, Google Analytics will drop a cookie in
the user’s browser for that website and any related subdomains. This makes it easy to track
traffic on a single website URL domain or subdomain by default.

Note that if you install the same default tracking code on pages with different domains,
Analytics will count these users and sessions separately. If you need to track users across
different domains, you will need to set up cross-domain tracking, which we’ll discuss later.

Anatomy of a "hit"

With each user interaction on your website, the Analytics tracking code sends what’s called a
“hit” to Google Analytics. A “hit” is a URL string with parameters of useful information about
your users. It looks something like this:

If we break down the URL string, you can see that it’s passing some useful information to
Analytics about the user that triggered the hit. For example, we can see things like:

 the language the user’s browser is set to


 the name of the page they’re viewing
 the screen resolution of the user’s device
 and the Analytics ID that associates that hit to the correct Analytics account.
This is just some of the information passed in the hit, depending on the user interaction with
the site and what is being tracked. The hit will also include other information like a randomly-
generated user identifier. This will allow Google Analytics to differentiate between new and
returning users.

The three most common types of hits are:

 “pageview” hits, “event” hits, and “transaction” hits

A “pageview” hit is triggered when a user loads a webpage with the tracking code. This is the
most common type of hit sent to Analytics. Every time a user opens a page with the tracking
code, a new pageview hit will be sent.

An “event” hit lets you track every time a user interacts with a particular element on your
website. For example, you can track whether users click a video Play button, a particular URL, or
a product carousel. Event hits pass four parameters of data in the URL: event action, category,
label, and value. You can use these to categorize interactions in reports that are specific to your
website. We’ll go into more detail on event tracking a little later.

A “transaction” hit (also called an “ecommerce” hit) can pass data to Analytics about
ecommerce purchases such as products purchased, transaction IDs, and “stock keeping units”
(or SKUs).

If you’ve set up Enhanced Ecommerce within Google Analytics, you can also pass additional
ecommerce data like product category, whether items have been added or removed from a
shopping cart, and how many times users viewed a product on a website.
There are additional hits such as “social hits” that can pass likes, shares, or tweet data; and
“page timing hits” that allow you to report on page timings, but the Pageview, Event, and
Transaction hits are the three most common.

We’ve discussed some of the information passed in hits such as Language and Page Title. But
Google Analytics widens that data using other sources such as IP address, server-log files, and
other ad-serving data. Using this additional information, Analytics can understand things like:

1. a user’s location; 2. specifics about their browser and operating system; 3. their age and
gender; 4. and the source/medium that referred them to a site.

You’ll recognize many of these parameter names passed in the hit or widened with additional
data because they get turned into the dimensions that make up your reports in Google
Analytics. Remember that dimensions are just ways to categorize metric data like all the metrics
for a specific “country” or “device type.”

Once the hit is sent to Google Analytics and combined with additional data, all of this
information is ready for processing by the Analytics servers. Understanding how Analytics
collects and processes data can help you better understand your reports and what the data
means.
1.2 Categorizing into users and sessions

Let’s look at the first few steps in which Google Analytics processes data.

 First, Analytics determines new vs. returning users.


 Then it categorizes hits into session (or periods in which the user engaged
with the site).
 Next, it joins data from the tracking code with other data sources.

New vs. Returning Users

In the first step, Google Analytics differentiates new from returning users. When a
user arrives on a page with tracking code, Google Analytics creates a random,
unique ID that gets associated with the user’s browser cookie. Analytics considers
each unique ID to be a unique user. Every time a new ID is detected, Analytics
counts a “new user” and sends it over with the hit. When Analytics detects an
existing ID, it sends a “returning user” value with the hit.

There are a couple of limitations to note about differentiating users. Since


Analytics uses a browser cookie to determine unique users over a given session,
this information will be lost if a user clears or has blocked that cookie in their web
browser. If a user clears their browser cookies, Google Analytics will set a new
unique ID the next time a browser loads a tracked web page. Analytics will then
count that user as “New,” rather than “Returning.”
Google Analytics can identify users over multiple sessions, as long as the sessions
happen in the same browser on the same device. Analytics doesn’t recognize
users who visit your website from different devices by default and will count each
device as a unique user. If you wish to track users across devices, you’ll need to
turn on the User ID feature, which we’ll cover later.

Defining Sessions

Next, in order to understand a user’s level of engagement with a website, Google


Analytics groups user hits based on the time in which they were generated. To
measure these periods, Analytics uses a metric called “sessions.”

Remember that on websites, a session begins when a user navigates to a page


that includes the Google Analytics tracking code and generates a “pageview” hit.
It will end after 30 minutes if no other hits are recorded. If a user returns to a
page after a session ends, a new session will begin.

Let’s look at a few examples of how hits can be organized into sessions.

For our first example, If a user visited the homepage of the Google Merchandise
Store and then left immediately without clicking on anything, Google Analytics
will record one “pageview” hit for that user in a single session.

But let’s take a look at a second example: A user lands on the homepage of the
Google Merchandise Store. The session begins with a “pageview” hit. Then the
user clicks the play button for a video that is being tracked with event tracking.
This triggers an “event” hit. Google Analytics will record two hits for that user in
that session: a “pageview” hit for the home page, and an “event” hit for clicking
the play button.

In a third example, a user visits the store and lands on the homepage. They
immediately open a new tab in their browser to view another website and they
spend more than 30 minutes on that site. Then they go back to the tab with the
Google Merchandise Store and click the play button on the video. Google
Analytics will record two separate sessions for that user.

The first session will include a “pageview” hit and the second session will include
an “event” hit, since the first session will have timed out, while the user was
viewing the second tab.

While sessions time out after thirty minutes of inactivity by default, you can
change this setting in your configurations to better align with user behavior on
your site. For example, a site with a goal to get users to watch videos may not
want sessions to timeout after thirty minutes. They can extend session timeout to
the average watch time of the videos on the site. Click the link at the end of this
lesson to view instructions for changing the default session timeout.

Once Google Analytics has organized data by session, it can calculate a number of
the metrics that show up in your reports such as sessions, pages per session,
average session duration, and bounce rate.

Joining Google Analytics data with other sources


In the third step of processing, Google Analytics will join the data collected by the
tracking code with other sources that you’ve specified. Let’s look at two ways to
add data from external systems using the measurement protocol and linking to
other Google accounts.

The measurement protocol lets you send data from any web-connected device
like point-of-sale systems or web-connected kiosks to Google Analytics. Unlike the
tracking code which sends hits automatically, if you want to collect data from a
system outside of Google, you must pass the data collection hits manually in a
URL string.

The measurement protocol defines how to construct your hits using a customized
tracking ID and send those hits to your designated Google Analytics account. You
can find more information about the Measurement Protocol in the Analytics
Developer documentation linked at the end of this lesson.

Google Analytics can also link data from other Google marketing tools like Google
Ads, AdSense, or the Google Search Console.

This allows information like Google Ads clicks, impressions, and cost data to be
viewed in your Analytics account.

These are the first three steps Google Analytics takes when processing data.
Watch the next video to see how Analytics finishes processing data.

You might also like