Do you want to know how Google Analytics works? Google Analytics can provide you with advanced metrics and data about your website traffic, but many beginners consider its data collection and reporting very complex.
In this article, we’ll show you how Google Analytics collects data, processes it, and prepares reports in simplest terms possible. By the time we’re done, Google Analytics will no longer feel like a complicated mystery to you; we promise.
How Does Google Analytics Collect Data?
After you create your Google Analytics account, you need to add the script on your website. MonsterInsights helps you properly and easily add Google Analytics to your WordPress site and makes sure that it’s sending all interactions to Google Analytics.
Once it’s setup, Google Analytics will drop a cookie in the user’s browser for your website. It will help to track every interaction that user performs on your site.
So, what are the interactions?
Interactions are all the types of actions users perform on your website. They can be as simple as loading a page or something more specific like clicking a link or a video play button.
With each user interaction on your website, the tracking code sends information to Analytics about your users and their interactions on your website. The information sent by the tracking code is called a hit.
A hit is a URL string with parameters of useful information about your users which looks something like the code in the image below.
The URL string shown above passes some useful information to Analytics about the user that triggered the hit. The highlighted parts are what information we can see when we break down the string. It can include information like:
- The language of the user’s browser
- The name of the page they’re viewing
- User’s device and its screen resolution
- The Analytics ID
Moreover, Google Analytics widens the collected data using other sources like IP address, server-log files, and other ad-serving data. Using the widened additional data, it can understand things like a user’s location, age, gender, their browser, operating system, source/medium that referred them to the site, etc.
The information passed through the hits varies by different types of user interactions. There are 3 most common types of hits:
- Pageview hit: This is the most common type of hit sent to Analytics. It’s triggered when a user loads a webpage with the tracking code on your site.
- Event hit: An event hit is sent when a user interacts with a particular element on your website. It tracks actions like clicking a video play button, a particular URL, a product carousel, or submitting a contact form.
- Transaction hit: Also called an eCommerce hit. A transaction hit passes data about the the user’s eCommerce purchases such as products purchased, transaction IDs, and stock keeping units (SKUs).
In addition, there’re other hits such as social hits that pass information about your social media likes, shares, or tweet data.
How Does Google Analytics Process Data?
Google Analytics data processing starts with the categorization of data into users and sessions.
First, Google Analytics determines new vs. returning users.
When a user lands on a page with tracking code, Google Analytics creates a random, unique ID associated with the user’s browser cookie. It takes each unique ID as a new unique user. So, when a new ID is detected, Analytics considers it as a new user. But when an existing ID is detected, it’s considered as a returning user and set over with the hit.
However, a new user is detected if the same user clears out the browser cookie or uses another device to view your webpage.
Next, Google Analytics categorizes the hits into sessions to understand a user’s level of engagement with your site. A session is a group of user hits that take place within a given time frame.
A session begins when a user arrives on a webpage with a tracking code. At first, it sends a pageview hit and then the user can perform multiple interactions like loading other pages, clicking links, etc. in the session. A session ends after 30 minutes of inactivity. If the user returns to a page after the session expires, a new session will begin.
Once the collected data is organized by session, it can calculate a number of metrics like the total number of sessions, pages per session, average session duration, and bounce rate.
In the third step of data processing, Analytics will join the data collected by the tracking code with other sources like measurement protocol or other Google marketing tools like Google Ads, AdSense, and the Search Console.
In the fourth step, it will further categorize and organize the data for filters, goals, data grouping, Custom Dimensions, custom metrics, etc. These are not processed by default, so this step takes place only if you’ve configured rules for them.
How Does Google Analytics Generate Reports?
Google Analytics reports are made up of 2 components: dimensions and metrics.
Dimensions are attributes of your data. For example, Country is a dimension which signifies countries like the United States, India, United Kingdom, etc.
The most common dimensions that Google Analytics creates by default are country, city, browser, operating system, service provider, and language.
Metrics are quantitative measurements of your dimensions. For example, the metric ‘sessions’ is the total number of sessions.
After the configuration settings have been applied to your collected data, Google Analytics will create dimensions, and calculate the metrics for each dimension. Then, it’ll store each dimension in its own aggregate database table as we see in reports. Most reports in Analytics use rows for dimensions and columns for the metrics associated with the dimension.
While creating dimensions and metrics during processing, Analytics has to determine the scope of the dimensions and metrics so as to know their applicability in different levels. Dimensions and metrics can be in 1 of the 3 levels:
Google Analytics will pair dimensions and metrics of the same scope together and create standard reports. Whereas you have to set an appropriate scope for any custom dimensions you create.
After Google Analytics has finished processing, you can access your website analytics reports from your Google Analytics account. However many beginners find it hard to navigate across these complex reports.
This is why we built MonsterInsights. We help you see user-friendly analytics report right inside your WordPress dashboard, so you can see the stats that matter to grow your business.
MonsterInsights Reports – A Quick Look
Let’s have a quick look at the MonsterInsights Reports now.
First, it’s the website overview report. You can see a graphical presentation of the sessions and pageviews for your site. Then, below that, you’ll see the total number of sessions, total pageviews, average duration per session, and bounce rate.
You can see these more metrics in overview report:
- New vs. returning users
- Device breakdown – Proportion of users on desktop, tablet and mobile
- Top 10 countries your visitors are from
- Top 10 referral websites sending you traffic
Second report you can view in MonsterInsights dashboard is Publishers Report. You can see your top landing pages, top exit pages, top outbound links, top affiliate links, top download links, demographics and interest categories in this report.
The third report in MonsterInsights is eCommerce report which provides a quick overview of your online shop’s performance. You can view your shop’s conversion rate, the number of transactions, how much revenue you’ve generated, and the average order value in it.
Plus, you can see the list of your top products and many more useful metrics about your online shop.
The fourth report is Search Console Report where you can view the top search queries your users use on search engines to find your site.
The fifth report is Custom Dimensions Report. You can view the following metrics for your site in this report:
- Most popular authors on your site
- Your best ranking keywords
- Top categories and tags on your site
- Most popular custom post types, etc.
The sixth and last type of report in MonsterInsights is Forms Report. It shows the performance of your contact forms and othe types of forms.
All these metrics are really useful to learn about your users and improve your marketing strategies, SEO, and to boost your conversions.
We hope this article helped you understand how Google Analytics works.
You might also like to check out our article on 10 Key eCommerce Metrics to Boost Your Revenue.