SlideShare una empresa de Scribd logo
1 de 17
GOOGLE
ANALYTICS
By- MD SHAKIR
UNIT-1 The Platform Components
Introduction
With Google Analytics, you can collect and analyze data across a variety of devices and
digital environments. Most organizations use Google Analytics to get a better understanding
of how their customers find and interact with websites and mobile apps, but Analytics can be
used to measure behavior on other devices like game consoles, ticket kiosks, and even
appliances. You can even use Google Analytics in really creative ways to collect “offline”
business data, like purchases that happen in your retail stores, as long as you have an accurate
way of collecting and 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
data from various environments. We’ll define the different parts of the Analytics
platform, and talk about how the data gets from the tracking code into your reports. This
lesson will provide the foundation you need to understand the tools you’ll eventually use
to set up Google Analytics.
The four components of the Google Analytics platform
When we talk about the platform, we’re referring to the technology that makes Google
Analytics work, 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.
Collection
Let’s take a look at collection first. Collection is all about getting data into your Google
Analytics account.
To collect data, you need to add Google Analytics code to your website, mobile app or other
digital environment you want to measure. This tracking code provides a set of instructions to
Google Analytics, telling it which user interactions it should pay attention to and which data
it should 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 a
Software 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
on a website or a screen in a mobile app, Google Analytics records that activity. First, the
tracking code collects information about each activity, like the title of the page viewed. Then
this data is packaged up in what we call a “hit”. Once the hit has been created it is sent to
Google’s servers for the next step -- data processing.
Processing & Configuration
During data processing, Google Analytics transforms the raw data from collection using the
settings in your Google Analytics account. These settings, also known as the
configuration, help you 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 remove
any data from your own employees. During processing Google Analytics would then filter
out all of 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 other
Google products, like Google AdWords, Google AdSense and Google Webmaster Tools.
You can even configure Google Analytics to import data from non-Google sources, like your
own internal data. It’s during the processing stage that Google Analytics then merges all of
these data 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. For
example, if you set a filter to exclude data from your employees, that data will be
permanently removed from your reports and can’t be recovered at a later date.
Reporting
After Google Analytics has finished processing, you can access and analyze your data using
the reporting interface, which includes easy-to-use reporting tools and data visualizations. It’s
also possible 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-party reporting tools.
Conclusion
Throughout 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
these platform components will help you better understand the data you see in Google
Analytics. It will also prepare you for more advanced topics about how you can customize
your data.
The Data Model
Introduction
Most digital analytics tools, including Google Analytics, use a simple model to organize the
data you 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 an interaction is what they do while they’re there. You can think of users, sessions
and interactions as a hierarchy. Let’s talk through the details of this hierarchy using the
analogy of a restaurant.
Users (visitors) and sessions (visits) in Google Analytics
Restaurants have many customers, some that visit for just one meal, and some that visit
regularly. 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
available has just one interaction during that visit. In another visit, they may check in, get
seated, order dinner, 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 just
one 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 same user 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 between
restaurant customers and their visits.
Second, Google Analytics can recognize returning users from multiple sessions over
time - just like a restaurant staff recognizes its regular customers.
Sessions (visits) and interactions in Google Analytics
A 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 would
have one interaction -- a page view. In another session, a user might visit your
homepage, watch a video, and make a purchase. That session includes three interactions.
In Google Analytics, we call each individual interaction within a session a “hit.” There are
different types of hits -- for example, pageviews, events and transactions. Each one is
designed to collect a different type of data.
Conclusion
You can now see that each interaction that Google Analytics tracks belongs to a session, and
each 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 course.
UNIT-2 Data Collection Overview
Introduction
Google Analytics uses tracking code to collect data. It doesn’t matter if you are tracking a
website, mobile app or other digital environment -- it’s the tracking code that gathers and
sends the data back to your account for reporting.
Using hits to collect and send data
Simply put, the tracking code collects information about a user’s activity. The information
that’s collected is packaged up and sent to the Analytics servers via an image request. This
image request is the “hit.” It’s the vehicle 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%20
r115&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 of information back to Google’s analytic servers. Some of these parameters
are encoded and can only be interpreted by Google Analytics. Others are actually human
readable, like the parameter utmul=, which shows the language that 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 -- Google Analytics uses different tracking technology to create the data hits. For
example, there is specific tracking code to create 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 and returning 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 is accomplished 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);
</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 same way. The tracking code collects and transmits user activity
data, identifies new and returning visitors, and associates all of this data to your specific
account.
Website Data Collection
Introduction
Google 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 what data is collected.
Adding the Google Analytics JavaScript code to your website
You simply add the standard code snippet before the closing </head> tag in the HTML of
every web 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
Google Analytics code runs, even if a user navigates away from a page before it fully loads.
Functions of the web tracking code
The 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.
Conclusion
That’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 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.
Mobile App Data Collection
Introduction
With Google Analytics, you can collect and analyze data about your mobile app, just like you
can with your website. However, since the technology to build and run mobile apps is
different than the technology used to build websites, there are differences in how Google
Analytics collects data from mobile apps.
Using the Google Analytics mobile SDKs
Instead of using JavaScript to collect data like you do on a website, youll use an SDK, or
Software Development Kit, to collect data from your mobile app. There are different SDKs
for different operating systems, including Android and iOS.
SDKs collect data about your app, like what users look at, the device operating system, and
how often a user opens the app. This data gets packaged as hits, and sent to your Google
Analytics account. This is similar to how the JavaScript code sends hits from a website.
Dispatching
Data from mobile apps is not sent to Analytics right away. When a user navigates through an
app, the Google Analytics SDK stores the hits locally on the device and then sends them to
your Google 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’t
connected 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 battery
life.
For these reasons, the SDKs automatically dispatch hits every 30 minutes for
Android devices and every two minutes for iOS devices, but you can customize this time
frame in your tracking code to control the impact on the battery life.
Differentiating users on mobile
Another important function of the mobile SDK is differentiating users. When an app launches
for the 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 in Google 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
app is then reinstalled, a new anonymous identifier is created on the device. The result is that
the user will be identified as a new user, not a returning user, but no other data in your
Google Analytics reports will be impacted.
Conclusion
The mobile SDKs provide a simple way to track user activity from an app, and collect most
of the data you’ll need without any customization. But keep in mind, there are many ways to
modify your code to collect additional information about your users, their sessions and their
interactions with your app.
Measurement Protocol Data Collection
Introduction
In 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 Protocol
The 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.
Conclusion
With 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.
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
Returning User.
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 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.
UNIT-3 Processing & Configuration Overview
Introduction
In 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
transform the data that you collect into the information you see in your reports.
Processing data and applying your configuration settings
During processing, there are four major transformations that happen to the data. You can
control parts 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 tracking
code. 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 any
configuration 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, Google
Analytics 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.
Conclusion
Understanding how Google Analytics transforms raw data during processing, and how your
configuration settings can control what happens during processing, will help you better
interpret and manage the data in your reports.
Importing Data into Google Analytics
Introduction
The 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 Analytics
There 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 linking
You 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 Import
In 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 Widening
With Dimension Widening, you can import just about any data into Google Analytics. For
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 Import
The 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.
Conclusion
Although 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.
Reporting Overview
Introduction
Once 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 overview
All 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.
Conclusion
It’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.
Building Reports with Dimensions & Metrics
Introduction
The 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 Analytics
A 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 Analytics
Metrics 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 reports
Dimensions 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 the count 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 long
users 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 a
session-based time metric, like Average Visit Duration.
Conclusion
Understanding what dimensions and metrics are and how they can be combined in your
reports will help you get the meaningful data you need to analyze your business and improve
your performance.
The Reporting APIs
Introduction
In addition to the online reporting interface, Google Analytics also gives you simple and
powerful reporting APIs. These help you save time by automating complex reporting tasks.
Using the Google Analytics reporting APIs
For example, you can use the APIs to integrate your own business data with Google
Analytics and build custom dashboards.
To use the reporting APIs, you have to build your own application. This application needs to
be able to write and send a query to the reporting API. The API uses the query to retrieve data
from the aggregate tables, and then sends a response back to your application containing the
data that was requested.
Each query sent to the API must contain specific information, including the ID of the view
that you would like to retrieve data from, the start and end dates for the report, and the
dimensions and metrics you want. Within the query you can also specify how to
filter, segment and order the data 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 of
rows. The header describes the name and data type of each column -- these are either the
dimension or metric names.
Conclusion
Writing an application that can access Google Analytics data can be a complex process and
requires the help of an experienced developer. But with a little effort, the reporting APIs give
you the power to automate and streamline complex reporting tasks for your business.
UNIT-4 Report Sampling
Introduction
Report sampling is an analytics practice that generates reports based on a small, random
subset of your data instead of using all of your available data. Sampling lets programs,
including Google Analytics, calculate the data for your reports faster than if every single
piece of data is included during the generation process.
When does sampling happen?
During processing, Google Analytics prepares the data for your standard reports by
precalculating it and then storing it in aggregate tables. This lets Google Analytics quickly
retrieve the data you request without sampling.
However, there might be times when you want to modify one of the standard reports in
Google Analytics by adding a segment, secondary dimension, or another customization.
Or, you might want 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
or the reporting APIs, Google Analytics inspects the set of aggregate tables to see if the
request can be met using data that’s already processed and is in the tables. If it can’t, Google
Analytics goes 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 the number of sessions is small enough, Google Analytics can calculate the data
for your request using all of the sessions. If the number of sessions is too large, Google
Analytics uses a sample to fulfill the request.
For example, let’s say you create a Custom Report with the dimensions City and
Campaign and the metrics Visits and Conversion Rate. This combination of metrics and
dimensions is not already pre-calculated in any of the aggregate tables. So, if you choose a
date range for the report that includes a very large number of sessions, your report will be
calculated from a sampled set of data.
Adjusting the sample size
The number of sessions used to calculate the report is called the “sample size.” You can
adjust the sample size using a control in the reporting interface or by specifying the size when
you query 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 include fewer sessions in your calculation, but your report will be generated
faster.
The sampling limit
Google Analytics sets a maximum number of sessions that can be used to calculate your
reports. If you go over that limit, your data gets sampled.
One way to stay below the limit is to shorten the date range in your report, which reduces the
number of sessions Google Analytics needs to calculate your request. Google Analytics
Premium also offers an Unsampled Reporting feature that will pull unsampled data for
custom requests, even for large reports that exceed the sampling limit.
Conclusion
Session sampling is an effective way to reduce latency while maintaining a high level of
accuracy for your reports. It helps Google Analytics process your custom data requests
efficiently, so you get timely answers to your business questions.

Más contenido relacionado

Último

Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 

Último (20)

Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destacado (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Google analytics

  • 2. UNIT-1 The Platform Components Introduction With Google Analytics, you can collect and analyze data across a variety of devices and digital environments. Most organizations use Google Analytics to get a better understanding of how their customers find and interact with websites and mobile apps, but Analytics can be used to measure behavior on other devices like game consoles, ticket kiosks, and even appliances. You can even use Google Analytics in really creative ways to collect “offline” business data, like purchases that happen in your retail stores, as long as you have an accurate way of collecting and 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 data from various environments. We’ll define the different parts of the Analytics platform, and talk about how the data gets from the tracking code into your reports. This lesson will provide the foundation you need to understand the tools you’ll eventually use to set up Google Analytics. The four components of the Google Analytics platform When we talk about the platform, we’re referring to the technology that makes Google Analytics work, 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. Collection Let’s take a look at collection first. Collection is all about getting data into your Google Analytics account. To collect data, you need to add Google Analytics code to your website, mobile app or other digital environment you want to measure. This tracking code provides a set of instructions to Google Analytics, telling it which user interactions it should pay attention to and which data it should 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 a Software 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 on a website or a screen in a mobile app, Google Analytics records that activity. First, the tracking code collects information about each activity, like the title of the page viewed. Then
  • 3. this data is packaged up in what we call a “hit”. Once the hit has been created it is sent to Google’s servers for the next step -- data processing. Processing & Configuration During data processing, Google Analytics transforms the raw data from collection using the settings in your Google Analytics account. These settings, also known as the configuration, help you 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 remove any data from your own employees. During processing Google Analytics would then filter out all of 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 other Google products, like Google AdWords, Google AdSense and Google Webmaster Tools. You can even configure Google Analytics to import data from non-Google sources, like your own internal data. It’s during the processing stage that Google Analytics then merges all of these data 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. For example, if you set a filter to exclude data from your employees, that data will be permanently removed from your reports and can’t be recovered at a later date. Reporting After Google Analytics has finished processing, you can access and analyze your data using the reporting interface, which includes easy-to-use reporting tools and data visualizations. It’s also possible 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-party reporting tools. Conclusion Throughout 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 these platform components will help you better understand the data you see in Google Analytics. It will also prepare you for more advanced topics about how you can customize your data.
  • 4. The Data Model Introduction Most digital analytics tools, including Google Analytics, use a simple model to organize the data you 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 an interaction is what they do while they’re there. You can think of users, sessions and interactions as a hierarchy. Let’s talk through the details of this hierarchy using the analogy of a restaurant. Users (visitors) and sessions (visits) in Google Analytics Restaurants have many customers, some that visit for just one meal, and some that visit regularly. 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 available has just one interaction during that visit. In another visit, they may check in, get seated, order dinner, 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 just one 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 same user 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 between restaurant customers and their visits. Second, Google Analytics can recognize returning users from multiple sessions over time - just like a restaurant staff recognizes its regular customers. Sessions (visits) and interactions in Google Analytics A 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 would have one interaction -- a page view. In another session, a user might visit your homepage, watch a video, and make a purchase. That session includes three interactions. In Google Analytics, we call each individual interaction within a session a “hit.” There are different types of hits -- for example, pageviews, events and transactions. Each one is designed to collect a different type of data. Conclusion You can now see that each interaction that Google Analytics tracks belongs to a session, and each 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 course.
  • 5. UNIT-2 Data Collection Overview Introduction Google Analytics uses tracking code to collect data. It doesn’t matter if you are tracking a website, mobile app or other digital environment -- it’s the tracking code that gathers and sends the data back to your account for reporting. Using hits to collect and send data Simply put, the tracking code collects information about a user’s activity. The information that’s collected is packaged up and sent to the Analytics servers via an image request. This image request is the “hit.” It’s the vehicle 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%20 r115&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 of information back to Google’s analytic servers. Some of these parameters are encoded and can only be interpreted by Google Analytics. Others are actually human readable, like the parameter utmul=, which shows the language that 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 -- Google Analytics uses different tracking technology to create the data hits. For example, there is specific tracking code to create 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 and returning users. We’ll explain how the tracking code does this in later lessons.
  • 6. Another key function of the tracking code is to connect your data to your Google Analytics account. This is accomplished 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); </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 same way. The tracking code collects and transmits user activity data, identifies new and returning visitors, and associates all of this data to your specific account. Website Data Collection Introduction Google 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 what data is collected. Adding the Google Analytics JavaScript code to your website You simply add the standard code snippet before the closing </head> tag in the HTML of every web 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.
  • 7. 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 Google Analytics code runs, even if a user navigates away from a page before it fully loads. Functions of the web tracking code The 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. Conclusion That’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 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. Mobile App Data Collection Introduction With Google Analytics, you can collect and analyze data about your mobile app, just like you can with your website. However, since the technology to build and run mobile apps is different than the technology used to build websites, there are differences in how Google Analytics collects data from mobile apps. Using the Google Analytics mobile SDKs Instead of using JavaScript to collect data like you do on a website, youll use an SDK, or Software Development Kit, to collect data from your mobile app. There are different SDKs for different operating systems, including Android and iOS. SDKs collect data about your app, like what users look at, the device operating system, and how often a user opens the app. This data gets packaged as hits, and sent to your Google Analytics account. This is similar to how the JavaScript code sends hits from a website.
  • 8. Dispatching Data from mobile apps is not sent to Analytics right away. When a user navigates through an app, the Google Analytics SDK stores the hits locally on the device and then sends them to your Google 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’t connected 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 battery life. For these reasons, the SDKs automatically dispatch hits every 30 minutes for Android devices and every two minutes for iOS devices, but you can customize this time frame in your tracking code to control the impact on the battery life. Differentiating users on mobile Another important function of the mobile SDK is differentiating users. When an app launches for the 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 in Google 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 app is then reinstalled, a new anonymous identifier is created on the device. The result is that the user will be identified as a new user, not a returning user, but no other data in your Google Analytics reports will be impacted. Conclusion The mobile SDKs provide a simple way to track user activity from an app, and collect most of the data you’ll need without any customization. But keep in mind, there are many ways to modify your code to collect additional information about your users, their sessions and their interactions with your app.
  • 9. Measurement Protocol Data Collection Introduction In 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 Protocol The 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. Conclusion With 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. 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.
  • 10. 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 Returning User. 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 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
  • 11. 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. UNIT-3 Processing & Configuration Overview Introduction In 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 transform the data that you collect into the information you see in your reports. Processing data and applying your configuration settings During processing, there are four major transformations that happen to the data. You can control parts 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 tracking code. 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 any configuration 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, Google Analytics 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. Conclusion Understanding how Google Analytics transforms raw data during processing, and how your configuration settings can control what happens during processing, will help you better interpret and manage the data in your reports.
  • 12. Importing Data into Google Analytics Introduction The 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 Analytics There 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 linking You 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 Import In 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 Widening With Dimension Widening, you can import just about any data into Google Analytics. For 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.
  • 13. 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 Import The 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. Conclusion Although 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. Reporting Overview Introduction Once 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 overview All 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.
  • 14. 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. Conclusion It’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. Building Reports with Dimensions & Metrics Introduction The 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 Analytics A 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 Analytics Metrics 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 reports Dimensions 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
  • 15. 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 the count 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 long users 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 a session-based time metric, like Average Visit Duration. Conclusion Understanding what dimensions and metrics are and how they can be combined in your reports will help you get the meaningful data you need to analyze your business and improve your performance. The Reporting APIs Introduction In addition to the online reporting interface, Google Analytics also gives you simple and powerful reporting APIs. These help you save time by automating complex reporting tasks. Using the Google Analytics reporting APIs For example, you can use the APIs to integrate your own business data with Google Analytics and build custom dashboards. To use the reporting APIs, you have to build your own application. This application needs to be able to write and send a query to the reporting API. The API uses the query to retrieve data from the aggregate tables, and then sends a response back to your application containing the data that was requested. Each query sent to the API must contain specific information, including the ID of the view that you would like to retrieve data from, the start and end dates for the report, and the dimensions and metrics you want. Within the query you can also specify how to filter, segment and order the data 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 of rows. The header describes the name and data type of each column -- these are either the dimension or metric names. Conclusion Writing an application that can access Google Analytics data can be a complex process and requires the help of an experienced developer. But with a little effort, the reporting APIs give you the power to automate and streamline complex reporting tasks for your business.
  • 16. UNIT-4 Report Sampling Introduction Report sampling is an analytics practice that generates reports based on a small, random subset of your data instead of using all of your available data. Sampling lets programs, including Google Analytics, calculate the data for your reports faster than if every single piece of data is included during the generation process. When does sampling happen? During processing, Google Analytics prepares the data for your standard reports by precalculating it and then storing it in aggregate tables. This lets Google Analytics quickly retrieve the data you request without sampling. However, there might be times when you want to modify one of the standard reports in Google Analytics by adding a segment, secondary dimension, or another customization. Or, you might want 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 or the reporting APIs, Google Analytics inspects the set of aggregate tables to see if the request can be met using data that’s already processed and is in the tables. If it can’t, Google Analytics goes 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 the number of sessions is small enough, Google Analytics can calculate the data for your request using all of the sessions. If the number of sessions is too large, Google Analytics uses a sample to fulfill the request. For example, let’s say you create a Custom Report with the dimensions City and Campaign and the metrics Visits and Conversion Rate. This combination of metrics and dimensions is not already pre-calculated in any of the aggregate tables. So, if you choose a date range for the report that includes a very large number of sessions, your report will be calculated from a sampled set of data. Adjusting the sample size The number of sessions used to calculate the report is called the “sample size.” You can adjust the sample size using a control in the reporting interface or by specifying the size when you query 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 include fewer sessions in your calculation, but your report will be generated faster. The sampling limit Google Analytics sets a maximum number of sessions that can be used to calculate your reports. If you go over that limit, your data gets sampled. One way to stay below the limit is to shorten the date range in your report, which reduces the number of sessions Google Analytics needs to calculate your request. Google Analytics
  • 17. Premium also offers an Unsampled Reporting feature that will pull unsampled data for custom requests, even for large reports that exceed the sampling limit. Conclusion Session sampling is an effective way to reduce latency while maintaining a high level of accuracy for your reports. It helps Google Analytics process your custom data requests efficiently, so you get timely answers to your business questions.