3 Understanding and using Google Analytics

How Google Analytics works

 

Study Guide

  • Understand how Google Analytics collects data, processes data and generates reports

 

Transcript

In order to properly understand the data you'll be working with in Google Analytics, it's important to have a high level overview of how the data is collected and processed before you see it in the reports.

 

There are four main components to the Google Analytics system: the data collection, the configuration, the data processing and reporting.

 

 

We will review each of these components in detail and how they work together to generate the data you need.

 

Let's start with collection.

You can use Google Analytics to collect user-interaction data from websites, mobile applications and really any digitally connected environment that you want to track, like a kiosk or a point-of-sale system.

 

 

We'll focus on the basics of website tracking first.

To track a website Google Analytics uses a small piece of JavaScript code to collect information.

 

You must place this piece of code on every page of the website.

When a user arrives at your website this JavaScript code will begin to collect various pieces of information about how the user engages with your site. The JavaScript can:

  • collect information from the website itself, like the URL of the pages that the user is viewing.
  • collect information from the user's browser, like the language the browser is set to, the browser name and the device and operating system used to access the site.
  • collect information from the referring source that brought the user to the site in the first place.

 

All of these pieces of information are packaged up and sent to Google's Analytics servers to await processing.

 

 

One package of information is usually referred to as a "hit" or an "interaction." Keep in mind that every time your user visits a new page on your site, the JavaScript code will collect and send new or updated information about the user's activity. An incredible amount of data can be collected by Google Analytics just by using the standard JavaScript tracking code.

But, keep in mind that there are many possible customizations that will allow you to collect additional data that you may have identified during your measurement planning process.

For example, if you run a loyalty program for your airline, you might want Google Analytics to keep track of your customers' frequent flyer status by collecting this information when a user logs on to your website.

 

 

by collecting this information when a user logs on to your website. It is possible, using additional JavaScript code, to collect this data and send it back to Google Analytics servers with the rest of your user-interaction data.

 

Conceptually, collecting data from mobile applications with Google Analytics is very similar to tracking websites. However, there are a few key differences in the collection process that you should be

aware of.

 

  • First, instead of using JavaScript code to collect data,mobile app tracking uses a different set of methods. These methods are specific to the operating system of the device.
  • Rather than automatically capturing data on each "pageview," mobile app tracking collects data after each "activity." You must add extra code to each "activity" you want to track.
  • One unique aspect of mobile app tracking is that mobile devices are not always connected to the internet. As a result, data can not always be sent to the collection servers in real time. To handle this situation, Google Analytics can store the "hits" and dispatch them to the servers when the device reconnects to the internet.

 

Collecting data from digital environments besides websites and mobile applications requires the assistance of a knowledgeable developer. Conceptually, the collection process isn't much different than from what's already been discussed.

 

In the web tracking scenario, a "hit" is sent every time a user views a page tagged with Google Analytics. In the mobile app scenario, a "hit" is sent every time a user completes an activity that's been tagged with Google Analytics.

 

So, to implement Google Analytics in another digital environment, you have to simply choose what type of user interaction you consider a "hit" for that specific environment.

 

For example, if you wanted to track your in-store purchases you could have your point-of-sale system send a "hit" every time a purchase is complete. That "hit" could include information like the store location, the items purchased, the purchase date and so on.

 

Regardless of where you're collecting data from, once the hits from a user have been collected on Google's servers, the next step that occurs is data processing.

 

 

You can think of processing as the transformation step that turns your raw data into something more useful.

 

For example, during data processing we categorize your users devices as mobile or non-mobile.

 

In this step, Google Analytics also applies your configuration settings to the raw data. For example, you can choose to add filters to your data. A filter can include or exclude certain types of data from your reports, like excluding data from your own internal users.

 

 

Once your data is processed, taking into account your configuration, the data is stored in a database.

 

It's important to note that once the data has been processed and inserted into the database it can't be changed.

 

The final component of the Google Analytics platform is reporting.

 

Typically, you will use the web interface at google.com/analytics to access your data. However, it is also possible to systematically retrieve data from your Google Analytics account using your own custom application code and the core Reporting API.

 

In summary, in this lesson we talked about how Google Analytics works and the four main parts of the system: data collection, data processing, configuration and reporting.

 

For more technical details about how Google Analytics works, check out our developer resources.

 

Key metrics and dimensions defined

 

Study Guide

  • Define the terms "metrics" and "dimensions" and identify examples of each in Google Analytics
  • Understand how key metrics like "visitors," "visits," "bounce rate" and other interaction metrics are calculated
 

Transcript

 

In this lesson, we are going to take a look at the types of data you find in digital analytics tools and define some of the common metrics in Google Analytics.

 

In any analytics tool, you will find two types of data. The first will describe characteristics of your users, their sessions and actions. We call these "dimensions" in Google Analytics. The second type of data are metrics. These are simply the quantitative measurements of users, sessions and actions. Metrics are numerical data. They're numbers.

 

 

Every report in Google Analytics will contain both dimensions and metrics.

Most commonly, you'll see dimensions and metrics reported in a table, with the first column containing a list of the values for one particular dimension, and the rest of the columns displaying the corresponding metrics.

 

 

Let's review a few of the common dimensions that you'll see in Google Analytics.

 

 

A dimension of your users is their geographic location.

A dimension of a session, is the traffic source that brought the user to your site. And a dimension of an action a user takes on your site could be the name of the page they viewed.

Metrics help you understand the behavior of your users.

 

 

 

They count how often things happen, like the total number of users on a website or an app.

Metrics can also be averages, like the average number of pages users see during a session on your website.

This is a very common way to measure engagement. You can also configure Google Analytics to track conversion metrics that measure when users take valuable actions, like the number of signs ups for a newsletter or purchases.

 

The metric called "visitors" or "users" measures the number of unique users that visit your site during a certain time period. This metric is most commonly used to understand the overall size of your audience. You can segment users into "new users" and "returning users" for your website or for

your app.

 

 

Visits, also known as sessions, are defined as a period of consecutive activity by the same user.

 

 

By default, in Google Analytics, a session persists until a user stops interacting with the site for 30 minutes.

 

We call this the session timeout length. You can define the session timeout length in your Google Analytics configuration settings.

 

Why would you want to customize the length of a session?

Think about how a user's behavior might differ between a basic text-based site and a streaming video site. On a text site a user may read a few pages and leave.

 

Their period of engagement is rather short, so setting a session timeout of 30 minutes seems reasonable.

 

But what about the video site?

Perhaps the user might watch a long video that's more than 30 minutes.

With the default implementation of Google Analytics the user's session will automatically end after 30 minutes of inactivity.

 

But in reality the user will still be active on the site watching the video.

In this case it would make sense to set the session timeout length to something longer than the longest video.

 

Let's talk about websites for a moment. Within each visit or session, your users will engage in one or more interactions with your pages.

 

Google Analytics will automatically track these interactions as "pageviews."

 

The pageview metric literally counts every time a page is viewed on your site.

Google Analytics can also track other interactions, like watching a video. These are called events and require additional customization to your implementation.

It's these interactions -- the pageviews and events -- that keep a visitor's session "active" according to Google Analytics.

 

Remember, by default, once a visitor stops engaging with your pages, or does not generate an event for more than 30 minutes, their session will expire.

 

It's important to keep in mind that all of the time-based metrics in Google Analytics rely on the stream of user activity, or hits, to be calculated properly.

 

Google Analytics keeps track of when each interaction happened in order to calculate time metrics.

For example, to calculate the metric "visit duration”  Google Analytics subtracts the time of the user's first interaction on your site from the time of the last interaction.

Remember, an interaction could be viewing a page, or if you have a more complicated implementation, an event.

 

To calculate the metric "time on page" Google Analytics takes the time that a user landed

on a particular page, and subtracts that from the the time of the next pageview.

 

 

Again, if you have a complicated implementation and use Events, Google Analytics will use the time of the last event on a page to calculate the "time on page." Finally, one key metric that is important to understand is "bounce rate." Bounce rate is the percentage of sessions with only one user interaction.

 

Traditionally, in web analytics, bounces are counted for users who land on a page of your site and leave immediately.

 

 

It does not matter how much time they spend on the page. If they land on a page, and leave immediately from that page without viewing any other content, it counts as a bounce.

Since bounced visits only consist of one interaction, Google Analytics does not have a second interaction to use for the calculation of visit duration or time on page. These visits, and the one pageview included in the visit, are assigned a visit duration and time on page of zero.

Why might you have a high bounce rate? First, it can be an indication that you aren't setting the right expectations for users entering the site.

 

 

Or it could be that you aren't providing a good enough experience for them once they arrive.

 

 

Alternatively, if you expect a user to only view one page, like on a blog, a high bounce rate is okay.

This metric is especially useful when you're trying to measure your landing page effectiveness

for your marketing campaigns.

 

Remember, time metrics and bounce rate depend on keeping track of a user's activity throughout

a session. This can actually be difficult for sites that don't load new pages frequently.

For example, sites that use AJAX or flash do not generate a lot of pageviews. You should consider adding Event Tracking to your implementation to generate more accurate data about a user's activity on your site. Otherwise, for these sites, you may see a very low average visit duration and a very

high bounce rate.

 

It's important to keep these concepts and definitions in mind as you begin using Google Analytics reports so that you are correctly interpreting your data.

 

Let's review what we covered in this lesson.

Google Analytics displays two types of data -- dimensions and metrics. Dimensions are characteristics of your users and their sessions. Metrics are the quantitative measurements -- sums, averages and ratios -- that describe user behavior.

For a complete list of the metrics and dimensions available in Google Analytics,

check out the Help Center.