Google Analytics Academy - Platform Principles

28
3/24/2014 Google Analytics Academy - Platform Principles - Lesson 1.1 - Text Lesson https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson1.1-TextLesson.html 1/1 Analytics Academy Platform Principles: Course Overview Introduction Hi, and welcome! My name is Justin Cutroni and I’ll be your instructor throughout this course. In my role as a Digital Analytics Evangelist at Google, I try to help people understand how important it is to make digital analytics an integral part of their business. What this course is about In this course, we’re going to cover the principles of the Google Analytics platform. You’ll learn what the different components of the platform are, and how they all work together. When you know how Google Analytics works, you’ll be able to make informed decisions about how to collect the data you need. And, understanding the platform will help you better interpret and analyze your data since you’ll know where the data came from, and why it looks the way it does in your reports. We’ll start this course by reviewing the structure of a Google Analytics account, and we’ll introduce you to the Google Analytics data model. From there, we’ll focus on the four components of the platform: Collection Processing Configuration Reporting We’ll explore how each of these components allows you to control the quantity and quality of the data you collect. Preparing for this course If you’re new to Google Analytics, we suggest you check out the Digital Analytics Fundamentals course before getting started. It’ll give you an overview of important analytics concepts, terminology and best practices, some of which we’ll explore in greater depth in this course. Conclusion We hope this course helps you make better decisions when it’s time to set up or change your Google Analytics implementation. And that with this information, you can better understand how to use Google Analytics to collect and analyze digital data to improve your business. We’re really excited to bring you this course. Let’s get started.

description

Course notes from Google Analytics Academy

Transcript of Google Analytics Academy - Platform Principles

Page 1: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 1.1 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson1.1-TextLesson.html 1/1

Analytics

Academy

Platform Principles: Course Overview

IntroductionHi, and welcome! My name is Justin Cutroni and I’ll be your instructor throughout this course. In

my role as a Digital Analytics Evangelist at Google, I try to help people understand how

important it is to make digital analytics an integral part of their business.

What this course is aboutIn this course, we’re going to cover the principles of the Google Analytics platform. You’ll learn

what the different components of the platform are, and how they all work together. When you

know how Google Analytics works, you’ll be able to make informed decisions about how to

collect the data you need. And, understanding the platform will help you better interpret and

analyze your data since you’ll know where the data came from, and why it looks the way it does

in your reports.

We’ll start this course by reviewing the structure of a Google Analytics account, and we’ll

introduce you to the Google Analytics data model. From there, we’ll focus on the four

components of the platform:

Collection

Processing

Configuration

Reporting

We’ll explore how each of these components allows you to control the quantity and quality of the

data you collect.

Preparing for this courseIf you’re new to Google Analytics, we suggest you check out the Digital Analytics

Fundamentals course before getting started. It’ll give you an overview of important analytics

concepts, terminology and best practices, some of which we’ll explore in greater depth in this

course.

ConclusionWe hope this course helps you make better decisions when it’s time to set up or change your

Google Analytics implementation. And that with this information, you can better understand how

to use Google Analytics to collect and analyze digital data to improve your business. We’re

really excited to bring you this course. Let’s get started.

Page 2: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 1.2 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson1.2-TextLesson.html 1/2

AnalyticsAcademy

Platform Principles: The Platform Components

IntroductionWith Google Analytics, you can collect and analyze data across a variety of devices and digitalenvironments. Most organizations use Google Analytics to get a better understanding of howtheir customers find and interact with websites and mobile apps, but Analytics can be used tomeasure behavior on other devices like game consoles, ticket kiosks, and even appliances. Youcan even use Google Analytics in really creative ways to collect “offline” business data, likepurchases that happen in your retail stores, as long as you have an accurate way of collectingand sending that data to your Analytics account.

In this lesson, we’re going to give you an overview of how Google Analytics works to collect datafrom various environments. We’ll define the different parts of the Analytics platform, and talkabout how the data gets from the tracking code into your reports. This lesson will provide thefoundation you need to understand the tools you’ll eventually use to set up Google Analytics.

The four components of the Google Analytics platformWhen we talk about the platform, we’re referring to the technology that makes Google Analyticswork, and not just the data and tools you see in your account.

There are four main parts of the Google Analytics platform:

Collection Configuration Processing Reporting

All four parts work together to help you gather, customize and analyze your data.

CollectionLet’s take a look at collection first. Collection is all about getting data into your Google Analyticsaccount.

To collect data, you need to add Google Analytics code to your website, mobile app or otherdigital environment you want to measure. This tracking code provides a set of instructions toGoogle Analytics, telling it which user interactions it should pay attention to and which data itshould collect. The way the data is collected depends on the environment you want to track.

For example, you’ll use the JavaScript tracking code to collect data from a website, but aSoftware Development Kit, called an SDK, to collect data from a mobile app.

Each time the tracking code is triggered by a user’s behavior, like when the user loads a page ona website or a screen in a mobile app, Google Analytics records that activity. First, the tracking

Page 3: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 1.2 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson1.2-TextLesson.html 2/2

code collects information about each activity, like the title of the page viewed. Then this data ispackaged up in what we call a “hit”. Once the hit has been created it is sent to Google’s serversfor the next step -­-­ data processing.

Processing & ConfigurationDuring data processing, Google Analytics transforms the raw data from collection using thesettings in your Google Analytics account. These settings, also known as the configuration, helpyou align the data more closely with your measurement plan and business objectives.

For example, you could set up something called a Filter that tells Google Analytics to removeany data from your own employees. During processing Google Analytics would then filter out allof the hits from your employees, so that this data wouldn’t be used for your report calculations.

You can also configure Google Analytics to import data directly into your reports from otherGoogle products, like Google AdWords, Google AdSense and Google Webmaster Tools. Youcan even configure Google Analytics to import data from non-­Google sources, like your owninternal data. It’s during the processing stage that Google Analytics then merges all of thesedata sources to create the reports you eventually see in your account.

It’s important to note that once your data has been processed, it can not be changed. Forexample, if you set a filter to exclude data from your employees, that data will be permanentlyremoved from your reports and can’t be recovered at a later date.

ReportingAfter Google Analytics has finished processing, you can access and analyze your data using thereporting interface, which includes easy-­to-­use reporting tools and data visualizations. It’s alsopossible to systematically access your data using the Google Analytics Core Reporting API.Using the API you can build your own reporting tools or extract your data directly into third-­partyreporting tools.

ConclusionThroughout the rest of this course, we will dive deeper into key topics about collection,configuration, processing and reporting. Having a comprehensive understanding of each of theseplatform components will help you better understand the data you see in Google Analytics. It willalso prepare you for more advanced topics about how you can customize your data.

Complete the lesson activity>> Visit the activity for this lesson now

Page 4: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 1.3 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson1.3-TextLesson.html 1/2

AnalyticsAcademy

Platform Principles: The Data Model

IntroductionMost digital analytics tools, including Google Analytics, use a simple model to organize the datayou collect. There are three components to this data model -­-­ users, sessions and interactions.A user is a visitor to your website or app, a session is the time they spend there, and aninteraction is what they do while they’re there. You can think of users, sessions and interactionsas a hierarchy. Let’s talk through the details of this hierarchy using the analogy of a restaurant.

Users (visitors) and sessions (visits) in Google AnalyticsRestaurants have many customers, some that visit for just one meal, and some that visitregularly. During each visit, a person can have one or more interactions with the restaurant staff.A customer that checks in with the host and leaves right away because no tables are availablehas just one interaction during that visit. In another visit, they may check in, get seated, orderdinner, and pay the bill. This visit has four interactions.

Like a restaurant, your website or mobile app also has visitors, or users. Some users visit justone time, and some visit multiple times. In Google Analytics, we refer to each visit as a session.Later in this course, we’ll talk in greater detail about how Google Analytics identifies the sameuser across multiple sessions. But for now, it’s important to remember two things:

First, there is a relationship between users and sessions, like the relationship betweenrestaurant customers and their visits.

Second, Google Analytics can recognize returning users from multiple sessions overtime -­ just like a restaurant staff recognizes its regular customers.

Sessions (visits) and interactions in Google AnalyticsA visit to a restaurant is made up of interactions, like ordering a meal and paying the bill.Similarly, a website or app session is made up of individual interactions.

For example, a user might visit your homepage and then leave right away. This session wouldhave one interaction -­-­ a page view. In another session, a user might visit your homepage, watcha video, and make a purchase. That session includes three interactions.

In Google Analytics, we call each individual interaction within a session a “hit.” There aredifferent types of hits -­-­ for example, pageviews, events and transactions. Each one is designedto collect a different type of data.

ConclusionYou can now see that each interaction that Google Analytics tracks belongs to a session, andeach session is associated with a user. We’ll revisit the three components of the data model -­-­users, sessions, and interactions -­-­ as we discuss the Google Analytics platform throughout this

Page 5: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 1.3 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson1.3-TextLesson.html 2/2

course.

Complete the lesson activity>> Visit the activity for this lesson now

Page 6: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 2.1 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson2.1-TextLesson.html 1/2

Analytics Academy

Platform Principles: Data Collection Overview

Introduction

Google Analytics uses tracking code to collect data. It doesn’t matter if you are tracking a website, mobile app orother digital environment -­-­ it’s the tracking code that gathers and sends the data back to your account forreporting.

Using hits to collect and send data

Simply put, the tracking code collects information about a user’s activity. The information that’s collected ispackaged up and sent to the Analytics servers via an image request. This image request is the “hit.” It’s thevehicle that transmits the data from your website or mobile app to Google Analytics.

Let’s look at an example of a small portion of an image request.

http://www.google-­analytics.com/__utm.gif?utmwv=4&utmn=769876874&utmhn=example.com

&utmcs=ISO-­8859-­1&utmsr=1280x1024&utmsc=32-­bit&utmul=en-­us&utmje=1&utmfl=9.0%20%20r115&utmcn=1&utmdt=GATC012%20setting%20variables&utmhid=2059107202&utmr=0&utmp=/au

to/GATC012.html?utm_source=www.gatc012.org&utm_campaign=campaign+gatc012&utm_term=

keywords+gatc012&utm_content=content+gatc012&utm_medium=medium+gatc012&utmac=UA-­30

138-­1&utmcc=...

In the example, everything after the question mark is called a parameter. Each parameter carries a piece ofinformation back to Google’s analytic servers. Some of these parameters are encoded and can only be interpretedby Google Analytics. Others are actually human readable, like the parameter utmul=, which shows the languagethat the user’s browser is set to (in this case, en-­us, which is US English).

How tracking works

Depending on the environment you want to track -­-­ a website, mobile app, or other digital experience -­-­ GoogleAnalytics uses different tracking technology to create the data hits. For example, there is specific tracking code tocreate hits for websites and different code to create hits for mobile apps.

In addition to creating hits, the tracking code also performs another critical function. It identifies new users andreturning users. We’ll explain how the tracking code does this in later lessons.

Another key function of the tracking code is to connect your data to your Google Analytics account. This isaccomplished through a unique identifier embedded in your tracking code.

Here is an example of what the tracking ID looks like:

<!-­-­ Google Analytics -­-­>

<script>

(function(i,s,o,g,r,a,m)i[GoogleAnalyticsObject]=r;;i[r]=i[r]||function()

(i[r].q=i[r].q||[]).push(arguments),i[r].l=1*new

Date();;a=s.createElement(o),

m=s.getElementsByTagName(o)

[0];;a.async=1;;a.src=g;;m.parentNode.insertBefore(a,m)

)(window,document,script,//www.google-­analytics.com/analytics.js,ga);;

ga(create, UA-­12345-­6, auto);;ga(send, pageview);;

Page 7: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 2.1 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson2.1-TextLesson.html 2/2

</script>

<!-­-­ End Google Analytics →

For your own account, you can find the tracking ID in the account administrative settings.

Conclusion

In summary, no matter what environment you’re tracking, all Google Analytics data collection works the sameway. The tracking code collects and transmits user activity data, identifies new and returning visitors, andassociates all of this data to your specific account.

Complete the lesson activity

>> Visit the activity for this lesson now

Page 8: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 2.2 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson2.2-TextLesson.html 1/2

AnalyticsAcademy

Platform Principles: Website Data Collection

IntroductionGoogle Analytics uses different tracking technology to measure user activity depending on the

specific environment you want to track -­-­ websites, mobile apps, or other digital experiences. To

track data from a website, Google Analytics provides a standard snippet of JavaScript tracking

code. This snippet references a JavaScript library called analytics.js that controls whatdata is collected.

Adding the Google Analytics JavaScript code to your websiteYou simply add the standard code snippet before the closing </head> tag in the HTML of everyweb page you want to track. This snippet generates a pageview hit each time a page is loaded.

It’s essential that you place the Google Analytics tracking code on every page of your site. If

you don’t, you won’t get a complete picture of all the interactions that happen within a given

website session.

When a user views a page on your site, the web browser begins to render the HTML on the page.

It starts at the top of the page and moves towards the bottom. When it gets to your Google

Analytics tracking code, the browser automatically triggers the JavaScript. Adding the code

snippet to the top of the page, before the closing </head> tag, ensures that the GoogleAnalytics code runs, even if a user navigates away from a page before it fully loads.

Functions of the web tracking codeThe Google Analytics tracking code executes JavaScript asynchronously, meaning that the

JavaScript runs in the background while the browser performs other tasks. This is very important

-­-­ it means that the Google Analytics tracking code will continue to collect data while the browser

renders the rest of the web page.

As the tracking code executes, Google Analytics creates anonymous, unique identifiers to

distinguish between users. There are different ways an identifier can be created. By default, the

Google Analytics JavaScript uses a first-­party cookie, but you can also create and use your own

identifier.

When a page loads, the JavaScript collects information from the website itself, like the URL of

the current page. The JavaScript also collects information from the browser, such as the user’s

language preference, the browser name, and the device and operating system being used to

access the site. All of this information is packaged up and sent to Google’s servers as a

pageview hit. This process repeats each time a page is loaded in the browser.

ConclusionThat’s it! That’s how basic website tracking works. The standard JavaScript code snippet

provides a simple way to track user activity from a website, and collects most of the data you’ll

Page 9: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 2.2 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson2.2-TextLesson.html 2/2

need without any customization. But keep in mind that there are many ways to customize your

code to capture additional information about your users, their sessions and the interactions with

your site.

Complete the lesson activity>> Visit the activity for this lesson now

Page 10: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 2.3 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson2.3-TextLesson.html 1/2

AnalyticsAcademy

Platform Principles: Mobile App Data Collection

IntroductionWith Google Analytics, you can collect and analyze data about your mobile app, just like youcan with your website. However, since the technology to build and run mobile apps is differentthan the technology used to build websites, there are differences in how Google Analyticscollects data from mobile apps.

Using the Google Analytics mobile SDKsInstead of using JavaScript to collect data like you do on a website, youll use an SDK, orSoftware Development Kit, to collect data from your mobile app. There are different SDKs fordifferent operating systems, including Android and iOS.

SDKs collect data about your app, like what users look at, the device operating system, and howoften a user opens the app. This data gets packaged as hits, and sent to your Google Analyticsaccount. This is similar to how the JavaScript code sends hits from a website.

DispatchingData from mobile apps is not sent to Analytics right away. When a user navigates through anapp, the Google Analytics SDK stores the hits locally on the device and then sends them to yourGoogle Analytics account later in a batch process called dispatching.

Mobile data collection uses dispatching for two reasons:

First, mobile devices can lose network connectivity, and when a device isn’tconnected to the web, the SDK can’t send any data hits to Google Analytics.

Second, sending data to Google Analytics in real time can reduce a device’s batterylife.

For these reasons, the SDKs automatically dispatch hits every 30 minutes for Android devicesand every two minutes for iOS devices, but you can customize this time frame in your trackingcode to control the impact on the battery life.

Differentiating users on mobileAnother important function of the mobile SDK is differentiating users. When an app launches forthe first time the Google Analytics SDK generates an anonymous unique identifier for the device,similar to the way the website tracking code does. Each unique identifier is also counted inGoogle Analytics as a unique user.

If the app gets updated to a new version, the identifier on the device remains the same.However, if the app gets uninstalled, the Google Analytics SDK deletes the identifier. If the appis then reinstalled, a new anonymous identifier is created on the device. The result is that the

Page 11: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 2.3 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson2.3-TextLesson.html 2/2

user will be identified as a new user, not a returning user, but no other data in your GoogleAnalytics reports will be impacted.

ConclusionThe mobile SDKs provide a simple way to track user activity from an app, and collect most ofthe data you’ll need without any customization. But keep in mind, there are many ways to modifyyour code to collect additional information about your users, their sessions and their interactionswith your app.

Complete the lesson activity>> Visit the activity for this lesson now

Page 12: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 2.4 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson2.4-TextLesson.html 1/1

AnalyticsAcademy

Platform Principles: Measurement Protocol Data Collection

IntroductionIn previous lessons, we’ve seen how websites use JavaScript and mobile apps use SDKs to

send data to Google Analytics. But what if you want to collect data from some other kind of

device? For example, you might want to track a point-­of-­sale system or user activity on a kiosk.

Collecting and sending data with the Measurement ProtocolThe Measurement Protocol lets you send data to Google Analytics from any web-­connected

device. Recall that the Google Analytics JavaScript and mobile SDKs automatically build hits to

send data to Google Analytics. However, when you want to collect data from a different device,

you must manually build the data collection hits. The Measurement Protocol defines how to

construct the hits and how to send them to Google Analytics.

For instance, let’s say we want to collect data from a kiosk. Here’s a sample hit that will track

when a user views a screen on the kiosk:

http://www.google-­analytics.com/collect?v=1&tid=UA-­XXXX-­Y&cid=555&sr=800x600&t=pageview&dh=mydemo.com&dp=/home&dt=homepage

Notice there is a parameter in the hit that contains the screen resolution. This particular

parameter will become the dimension Screen Resolution during processing. The value in the

parameter will end up in the Screen Resolutions report.

Like the JavaScript and mobile SDKs which include a tracking ID with each hit, you must also

add a tracking ID to every hit you send to Google Analytics. This will ensure that the data

appears in your specific Analytics account and property. All of the parameters that you can

include in the hit are explained in the Analytics Developer documentation.

ConclusionWith the Measurement Protocol, you can use Google Analytics to collect data from any kind of

device. And, as more and more technologies and digital devices come to market, you’ll be able

to continue to use Google Analytics to measure your success.

Complete the lesson activity>> Visit the activity for this lesson now

Page 13: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 3.1 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson3.1-TextLesson.html 1/1

Analytics

Academy

Platform Principles: Processing & Configuration Overview

IntroductionIn this unit, we’re going to cover two parts of the Google Analytics platform that go hand-­in-­hand:processing and configuration. These two components work together to organize and transformthe data that you collect into the information you see in your reports.

Processing data and applying your configuration settingsDuring processing, there are four major transformations that happen to the data. You can controlparts of these transformations using the configuration settings in your Properties and Views.

First, Google Analytics organizes the hits you’ve collected into users and sessions.There is a standard set of rules that Google Analytics follows to differentiate users and

sessions, but you can customize some of these rules through your configuration

settings.

Second, data from other sources can be joined with data collected via the trackingcode. For example, you can configure Google Analytics to import data from Google

AdWords, Google AdSense or Google Webmaster Tools. You can even configure

Google Analytics to import data from other non-­Google systems.

Third, Google Analytics processing will modify your data according to anyconfiguration rules you’ve added. These configurations tell Google Analytics what

specific data to include or exclude from your reports, or change the way the data’s

formatted.

Finally, the data goes through a process called “aggregation.” During this step, GoogleAnalytics prepares the data for analysis by organizing it in meaningful ways and storing

it in database tables. This way, your reports can be generated quickly from the database

tables whenever you need them.

ConclusionUnderstanding how Google Analytics transforms raw data during processing, and how yourconfiguration settings can control what happens during processing, will help you better interpretand manage the data in your reports.

Complete the lesson activity>> Visit the activity for this lesson now

Page 14: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 3.2 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson3.2-TextLesson.html 1/2

Analytics

Academy

Platform Principles: Processing Hits into Sessions & Users

Introduction

Google Analytics uses a data model with three components -­-­ users, sessions and interactions -­-­

to organize the data you see in your reports. These three components are derived from the hits

that the tracking code sends to Google Analytics. In this lesson, we’ll focus on how Google

Analytics transforms hits into users and sessions.

How hits are organized by users

First, let’s talk about how Google Analytics creates users. The first time a device loads your

content and a hit is recorded, Google Analytics creates a random, unique ID that is associated

with the device. Each unique ID is considered to be a unique user in Google Analytics. This

unique ID is sent to Google Analytics in each hit, and every time a new ID is detected, Google

Analytics counts a New User. When Google Analytics sees an existing ID in a hit, it counts a

Returning User.

It’s possible for these IDs to get reset or erased. This happens if a user clears their cookies in a

web browser, or uninstalls and then reinstalls a mobile app. In these scenarios, Google Analytics

will set a new unique ID the next time the device loads your content. Because the ID for the

device is no longer the same as it was before, a New User gets counted instead of a ReturningUser.

The unique ID that Google Analytics automatically sets is specific to every device, but you can

customize how Google Analytics creates and assigns the ID. Rather than using the random

numbers that the tracking code creates, you can override the unique ID with your own number.

This lets you associate user interactions across multiple devices.

How hits are organized into sessions

Now let’s talk about how Google Analytics creates sessions. A session in Google Analytics is a

collection of interactions, or hits, from a specific user during a defined period of time. These

interactions can include pageviews, events or e-­commerce transactions.

A single user can have multiple sessions. Those sessions can occur on the same day, or over

several days, weeks, or months. As soon as one session ends, there is then an opportunity to

start a new session. But how does Google Analytics know that a session has ended?

By default, a session ends after 30 minutes of inactivity. We call this period of time the session

“timeout length.” If Google Analytics stops receiving hits for a period of time longer than the

timeout length, the session ends. The next time Google Analytics detects a hit from the user, a

new session is started.

Here’s a simple illustration of what sessions might look like in the real world. Let’s say a user

searches for something on google.com, and clicks one of the search results. When they land on

the webpage, a New User is detected, a pageview hit is collected, and the session begins. If the

Page 15: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 3.2 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson3.2-TextLesson.html 2/2

user clicks to another page on the same site, the new pageview hit is sent to Google Analytics

and processed as a part of the same session.

But let’s say the user leaves their computer for two hours. When they return to their computer

and click to a new page on the same site, a new session will begin. Google Analytics

automatically ends the first session because too much time passed without receiving any hits.

In this scenario, Google Analytics will process the data as two separate sessions.

Session timeout length

The 30 minute default timeout length is appropriate for most sites and apps, but you can change

this setting in your configuration based on your business needs. For example, you might want to

lengthen the session timeout if your website visitors or app users do not interact with your

content frequently during a session, like if they watch a video that’s longer than 30 minutes.

Conclusion

Users and sessions are a critical part of the digital analytics data model. All of the reports you

see in Google Analytics depend on this model to organize the data. And the better you

understand how Google Analytics creates users and sessions from the raw data, the more you’ll

get out of your reports.

Complete the lesson activity

>> Visit the activity for this lesson now

Page 16: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 3.3 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson3.3-TextLesson.html 1/2

AnalyticsAcademy

Platform Principles: Importing Data into Google Analytics

IntroductionThe most common way to get data into Google Analytics is through your tracking code, but you

can also add data from other sources. By adding data into Google Analytics, you can give more

context to your analysis.

Importing data into Google AnalyticsThere are two ways to add data into your Google Analytics account without using the tracking

code: through account linking and through Data Import. Both are managed via your Configuration

settings in the Admin section of Google Analytics. Any data that you add from these sources will

be processed along with all the hits you collect from the tracking code. Let’s look at account

linking first.

Account linkingYou can link various Google products directly to Google Analytics via your account settings.

This includes:

Google AdWords

Google AdSense

Google Webmaster Tools

When you link a product, data from that product flows into your Analytics account. For example,

if you link AdWords to Google Analytics, you’ll see your AdWords click, impression and cost

data in your Analytics reports.

Data ImportIn addition to account linking, you can add data to Google Analytics using the Data

Import feature. This might include advertising data, customer data, product data, or any other

data.

To import data into Google Analytics there must a “key” that exists both in the data that Google

Analytics collects and in the data you want to import. The key is the common element that

connects the two sets of data.

There are two ways to import data into Google Analytics:

1. Dimension Widening

2. Cost Data Import

Using Dimension WideningWith Dimension Widening, you can import just about any data into Google Analytics. For

Page 17: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 3.3 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson3.3-TextLesson.html 2/2

example, if you’re a publisher you might want to segment your data based on the author and

topic of your online articles. While this data is not normally collected by Google Analytics, you

might have it stored in an internal system.

With Dimension Widening, you could import author and topic as new dimensions for your content

pages. You could use each article’s page URL as the “key” that links the new data to your

existing Google Analytics data. Once added, author and topic would be treated just like any

other dimensions in Google Analytics -­-­ you could add these dimensions to custom reports,

dashboards or segments.

You can add data using Dimension Widening either by uploading a file or by using the Google

Analytics APIs. Uploading a file, like a spreadsheet or .CSV, is easy, but it can be time

consuming if you need add data often. To save time, you can build a program that uses the

APIs to automatically send data into Google Analytics on a regular basis.

Using Cost Data ImportThe other kind of data import is called Cost Data Import. You use this feature specifically to add

data that shows the amount of money you spent on your non-­Google advertising. Importing cost

data lets Google Analytics calculate the return-­on-­investment of your non-­Google ads. This is

helpful when you want to compare the performance of your advertising campaigns.

To import cost data for a specific advertising campaign, you have to have a file that includes

both the campaign source and the campaign medium. This information provides the key that can

link the two data sources together.

ConclusionAlthough you’ll collect most of your data using the tracking code, account linking and data import

are two powerful ways to add more context to your Google Analytics data. By choosing the right

data sources to link or import into Google Analytics, you can better measure the performance of

your business.

Complete the lesson activity>> Visit the activity for this lesson now

Page 18: Google Analytics Academy - Platform Principles

6/23/2014 Google Analytics Academy - Platform Principles - Lesson 3.4 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson3.4-TextLesson.html 1/2

AnalyticsAcademy

Platform Principles: Transforming & Aggregating Data

IntroductionAn important part of processing is data transformation and aggregation. This is how GoogleAnalytics applies your configuration settings to all of your data and prepares it for your reports.

The role of configuration settings during processingYour configuration settings can impact your reports in one of three ways: by including data,excluding data, or modifying how data appears in a reporting View.

There are a lot of configuration options in Google Analytics, but we’re going to talk about a few ofthe most important ones that everyone should try: Filters, Goals, and Grouping.

Common configuration settings: FiltersFilters provide a flexible way you can modify the data within each view. You can use them toexclude data, include data, or actually change how the data looks in your reports. Filters helpyou transform the data so it’s better aligned with your reporting needs.

For example, you can create a filter to exclude traffic from a particular IP address or to convertmessy page URLs into readable text. During processing, Google Analytics checks each data hitagainst your filters. If a hit matches the logic in a filter, that data is modified. If you excludedtraffic from a specific IP address, for example, any hit coming from that IP address will bepermanently removed from your report data.

Common configuration settings: GoalsAnother way to transform your data is to set up Goals. When you set up Goals, GoogleAnalytics creates new metrics for your reports, like conversions and conversion rates.

Goals let you specify which pageviews, screen views or other hits should be used to calculateconversions. You can, for example, set up a Goal to track newsletter sign-­ups. Each time a usercompletes a sign-­up, a conversion is logged in your Google Analytics account. Using theconversion metrics, you can analyze whether or not you’re meeting your business objectives.

Common configuration settings: Channel Grouping and Content GroupingGrouping is another way you can transform your data. With grouping, you can aggregate certainpieces of data together so you can analyze the collective performance. You can create twotypes of groups in Google Analytics: Channel groups and Content groups.

A Channel Group is a collection of common marketing activities. For example, DisplayAdvertising, Social media, Email marketing, and Paid Search are four common channel groupsthat are each a roll-­up of several marketing activities.

Page 19: Google Analytics Academy - Platform Principles

6/23/2014 Google Analytics Academy - Platform Principles - Lesson 3.4 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson3.4-TextLesson.html 2/2

Content Groups are like Channel Groups, except you use them to create and analyze acollection of content. For example, if you’re an ecommerce business, you might want to group allof your product pages together, like t-­shirts, jeans, and hats, into a group call Product Pages,and group all of your content pages, like blog posts, together in another group called ContentPages. This would let you quickly see how well the Product Pages group and the ContentPages group each performed in aggregate.

Data aggregationAll of your configuration settings, including Filters, Goals, and Grouping, are applied to your databefore it goes through aggregation, the final step of data processing.

During aggregation, Google Analytics creates and organizes your report dimensions into tables,called aggregate tables. Google Analytics pre-­calculates your reporting metrics for each value ofa dimension and stores them in the corresponding table. When you open a Google Analyticsreport, a query is sent to the aggregate tables that are full of this prepared data, and returns thespecific dimensions and metrics for the report. Storing data in these tables makes it faster foryour reports to access data when you request it.

ConclusionThrough these final stages of processing -­-­ applying your configuration settings and creatingaggregate tables -­-­ Google Analytics transforms your raw hits into the meaningful data you seein your reports.

Complete the lesson activity>> Visit the activity for this lesson now

Page 20: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 4.1 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson4.1-TextLesson.html 1/1

Analytics

Academy

Platform Principles: Reporting Overview

IntroductionOnce your Google Analytics data has been collected and processed, you’ll use the Google

Analytics reporting interface or the Google Analytics reporting APIs to retrieve your data for

reporting and analysis.

Reporting overviewAll Google Analytics reports are based on different combinations of dimensions and metrics.

When viewing your data in a standard Google Analytics report, the first column you see in the

table contains the values for a dimension, and the rest of the columns display the corresponding

metrics.

Most often, you’ll use the Google Analytics reporting interface to access your data, since it’s

easy to use for a majority of reporting and analysis needs. You can think of this interface as a

layer on top of your data that allows you to organize, segment and filter your data with a set of

analysis tools.

In addition to the reporting interface, you can use an API, or an Application Programming

Interface, to extract your data directly from Google Analytics. Using the APIs you can

programmatically add analytics data to your custom applications, like an internal dashboard.

This can help you automate and customize the reporting process for your business.

Most of the time, when you request data from the reporting interface or the APIs you’ll receive

your data almost immediately. But in some cases, where you request complex data, Google

Analytics uses a process called sampling. Sampling helps Google Analytics retrieve your data

faster so there’s not a long delay between when you request the data and when you receive it.

ConclusionIt’s important to understand the building blocks of the Google Analytics reporting system. When

you know how Google Analytics generates reports in the UI and how you can build your own

reports using the APIs, you can simplify the reporting process and better integrate analytics into

your organization.

Complete the lesson activity>> Visit the activity for this lesson now

Page 21: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 4.2 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson4.2-TextLesson.html 1/2

AnalyticsAcademy

Platform Principles: Building Reports with Dimensions &Metrics

IntroductionThe building blocks of every report in Google Analytics are dimensions and metrics. By

combining different dimensions and metrics Google Analytics can generate almost any report

you need to measure your marketing activities and user behavior.

Dimensions in Google AnalyticsA dimension describes characteristics of your data. For example, a dimension of a session is

the traffic source that brought the user to your site. And a dimension of an interaction a user

takes on your site could be the name of the page they viewed.

Metrics in Google AnalyticsMetrics are the quantitative measurements of your data. They count how often things happen,

like the total number of users on a website or app. Metrics can also be averages, like the

average number of pages users see during a session on your website.

Combining dimensions and metrics in reportsDimensions and metrics are used in combination with one another. The values of dimensions

and metrics and the relationships between those values is what creates meaning in your reports.

Most commonly, you’ll see dimensions and metrics reported in a table, with the first column

containing the values for one particular dimension, and the rest of the columns displaying the

corresponding metrics.

However, not every metric can be combined with every dimension. Each dimension and metric

has a scope that aligns with a level of the analytics data hierarchy -­-­ user-­, session-­, or hit-­level.

In most cases, it only makes sense to combine dimensions and metrics in your reports that

belong to the same scope.

For example, the count of Visits is a session-­based metric so it can only be used with session-­level dimensions like traffic Source or geographic location. It would not be logical to combine thecount of visits metric with a hit-­level dimension like Page Title.

Here’s another example: the metric Time on Page is a hit-­level metric. It measures how longusers spend on a page of your site. It is not possible to use this metric with a session-­level

dimension like traffic Source or geographic location. In this case you would need to use asession-­based time metric, like Average Visit Duration.

ConclusionUnderstanding what dimensions and metrics are and how they can be combined in your reports

Page 22: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 4.2 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson4.2-TextLesson.html 2/2

will help you get the meaningful data you need to analyze your business and improve your

performance.

Complete the lesson activity>> Visit the activity for this lesson now

Page 23: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 4.3 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson4.3-TextLesson.html 1/1

AnalyticsAcademy

Platform Principles: The Reporting APIs

IntroductionIn addition to the online reporting interface, Google Analytics also gives you simple and powerfulreporting APIs. These help you save time by automating complex reporting tasks.

Using the Google Analytics reporting APIsFor example, you can use the APIs to integrate your own business data with Google Analyticsand build custom dashboards.

To use the reporting APIs, you have to build your own application. This application needs to beable to write and send a query to the reporting API. The API uses the query to retrieve data fromthe aggregate tables, and then sends a response back to your application containing the datathat was requested.

Each query sent to the API must contain specific information, including the ID of the view thatyou would like to retrieve data from, the start and end dates for the report, and the dimensionsand metrics you want. Within the query you can also specify how to filter, segment and order thedata just like you can with tools in the online reporting interface.

You can think of the data that gets returned from the API as a table with a header and a list ofrows. The header describes the name and data type of each column -­-­ these are either thedimension or metric names.

ConclusionWriting an application that can access Google Analytics data can be a complex process andrequires the help of an experienced developer. But with a little effort, the reporting APIs give youthe power to automate and streamline complex reporting tasks for your business.

Complete the lesson activity>> Visit the activity for this lesson now

Page 24: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 4.4 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson4.4-TextLesson.html 1/2

AnalyticsAcademy

Platform Principles: Report Sampling

IntroductionReport sampling is an analytics practice that generates reports based on a small, random subsetof your data instead of using all of your available data. Sampling lets programs, includingGoogle Analytics, calculate the data for your reports faster than if every single piece of data isincluded during the generation process.

When does sampling happen?During processing, Google Analytics prepares the data for your standard reports byprecalculating it and then storing it in aggregate tables. This lets Google Analytics quicklyretrieve the data you request without sampling.

However, there might be times when you want to modify one of the standard reports in GoogleAnalytics by adding a segment, secondary dimension, or another customization. Or, you mightwant to create a custom report with a completely new combination of dimensions and metrics.

When you make any of these kinds of custom requests, either through the reporting interface orthe reporting APIs, Google Analytics inspects the set of aggregate tables to see if the requestcan be met using data that’s already processed and is in the tables. If it can’t, Google Analyticsgoes back to the raw session data to process your request on-­the-­fly. When this happens,Google Analytics checks to see how many sessions should be included in your request. If thenumber of sessions is small enough, Google Analytics can calculate the data for your requestusing all of the sessions. If the number of sessions is too large, Google Analytics uses a sampleto fulfill the request.

For example, let’s say you create a Custom Report with the dimensions City and Campaign andthe metrics Visits and Conversion Rate. This combination of metrics and dimensions is notalready pre-­calculated in any of the aggregate tables. So, if you choose a date range for thereport that includes a very large number of sessions, your report will be calculated from asampled set of data.

Adjusting the sample sizeThe number of sessions used to calculate the report is called the “sample size.” You can adjustthe sample size using a control in the reporting interface or by specifying the size when youquery the API. If you increase the sample size, you’ll include more sessions in your calculation,but it’ll take longer to generate your report. If you decrease the the sample size, you’ll includefewer sessions in your calculation, but your report will be generated faster.

The sampling limitGoogle Analytics sets a maximum number of sessions that can be used to calculate yourreports. If you go over that limit, your data gets sampled.

Page 25: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Lesson 4.4 - Text Lesson

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Lesson4.4-TextLesson.html 2/2

One way to stay below the limit is to shorten the date range in your report, which reduces thenumber of sessions Google Analytics needs to calculate your request. Google AnalyticsPremium also offers an Unsampled Reporting feature that will pull unsampled data for customrequests, even for large reports that exceed the sampling limit.

ConclusionSession sampling is an effective way to reduce latency while maintaining a high level ofaccuracy for your reports. It helps Google Analytics process your custom data requestsefficiently, so you get timely answers to your business questions.

Complete the lesson activity>> Visit the activity for this lesson now

Page 26: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Glossary

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Glossary.html 1/3

Analytics

Academy

Platform Principles: Course Glossary

Channel Grouping

A roll-­up of traffic sources in the Acquisition reports that

groups several marketing activities together. Channel

groupings allow you to view and compare aggregated

metrics by channel name, as well as individual traffic

source, medium, or campaign name.

Collect ion

The component of the Google Analytics platform that

manages which data is collected for your site, mobile app

or other digitally connected device.

Configurat ionThe component of the Google Analytics platform that

manages how your data is processed.

Content Grouping

A roll-­up of content in the Behavior reports that groups

several pages or screens together to better reflect

the structure of your site or app. Content groupings allow

you to view and compare aggregated metrics by content

group name, as well as individual URL, page title, or

screen name.

Data model

The model used by Google Analytics to organize how

data is collected. This can be thought of as a hierarchy of

users, sessions, and interactions.

Dimension

A descriptive attribute or characteristic of data. Browser,Landing Page and Campaign are all examples of defaultdimensions in Google Analytics.

Dimension Widening

A data import process that allows you to join data from

external sources with your Google Analytics data to for

reporting and analysis in Google Analytics.

Filter

A configuration setting that allows you to add, remove or

modify your data during processing before it is displayed

in your reports.

First -party cookie

A small text file stored on a user’s browser to distinguish

the it from other browsers that store different cookies.

Since a first-­party cookie is associated with the domain of

the site a user visits, it cannot be read or edited by third-­

party sites.

Page 27: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Glossary

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Glossary.html 2/3

Goal

A configuration setting that allows you to track the

valuable actions, or conversions, that happen on your site

or mobile app.

HitA single-­pixel image request that is used to send data to

Google Analytics.

Interact ion

Any type of engagement activity (e.g. navigating to a new

page on a website) from a user during their session on

your site or mobile app.

Measurement ProtocolA standard set of rules for collecting and sending hits

from any digitally connected device to Google Analytics.

MetricThe quantitative measurements of your data. Metrics in

Google Analytics can be sums or ratios.

PageviewAn instance of a page being loaded (or reloaded) in a

browser.

Processing

The component of the Google Analytics platform that

organizes raw data into users and sessions, adds data

from other sources, and applies configuration settings to

transform the raw data into database tables for reporting.

Property

A sub-­component of a Google Analytics account that

determines which data is organized and stored together.

Any resource tagged with the same Property ID is

collected and stored together. A single property can be

used to track one website or mobile app, or be a roll-­up of

the data from multiple sites or mobile apps.

Report ing

The component of the Google Analytics platform that

gives you access to your processed data via the Google

Analytics interface or the APIs.

Report ing API

A set of protocols and tools designed to extract data from

your Google Analytics account into custom scripts or

programs for more automated and efficient reporting and

analysis. API is short for Application ProgrammingInterface.

Sampling

The practice of selecting a subset of data from your

traffic and reporting on the trends detected in that sample

set. Sampling is widely used in statistical analysis

because analyzing a subset of data gives similar results

to an analysis of a complete data set, but can produce

these results with a smaller a computational burden and a

reduced processing time.

Page 28: Google Analytics Academy - Platform Principles

3/24/2014 Google Analytics Academy - Platform Principles - Glossary

https://analyticsacademy.withgoogle.com/course02/assets/html/GoogleAnalyticsAcademy-PlatformPrinciples-Glossary.html 3/3

SDK

Software Development Kit

A set of software development tools used for Google

Analytics tracking on mobile applications.

Segment

A subset of sessions or users that share a common

attribute. Segments allow you to isolate and analyze

groups of sessions or users for better analysis.

Sessions / Visits

The period of time a user is active on your site or app. By

default, if a user is inactive for 30 minutes or more, any

future activity is attributed to a new session. Users that

leave your site and return within 30 minutes are counted

as part of the original session.

Tracking codeA small snippet of JavaScript code inserted into an HTML

web page in order to capture page interaction data.

Universal Analyt ics

The newest Google Analytics tracking code that collects

data from any digital device. Universal Analytics

simplifies the set up of tracking code and configurations.

Users / VisitorsThe unique browsers that visit your website or mobile

app.

View

A subset of a Google Analytics account property that can

have its own unique configuration settings. You can

create multiple views for a single property and modify

what data shows in each view.