The Ultimate Recipe to Use Google Analytics in 2022
What is Google Analytics?
Google Analytics, or GA, is a free analytics tool that gives you an in-depth look at your website and/or app performance. It integrates with Google’s marketing and advertising platforms and products (including Google Ads, Search Console, and Data Studio) making it a popular choice for anyone using multiple Google tools.
Is Google Analytics Free?
There’s a free and a paid version of GA (the latter is called Analytics 360). Small and medium-sized businesses will likely get all the features you need from the free version. Analytics 360 begins at $150,000 per year (invoiced monthly) and increases after your site receives more than one billion monthly hits.
Should you use Google Analytics?
If you want a lot of data — and more importantly, have the time and ability to analyze and act on it — GA is a great fit. However, GA takes time to set up, learn, implement, maintain, and use.
Other marketing analytics options, such as HubSpot, can give you all the data you need with much less work.
Now, what steps will you need to follow when setting up GA? Good question.
How to Set Up Google Analytics
- Create a Google Analytics account.
- Add the name, URL, and industry of the website you want to track.
- Add a view to your property.
- Add your tracking code directly after the head tag of your site.
- Visit your GA portal and verify the code is working.
Before you start using Google Analytics, you’ll have to set up a Google account. This means you must have a registered Google Account email address and password.
Once you’ve created a Google account, that doesn’t mean you automatically have access to GA — rather, you have to register for Analytics (which we’ll review how to do in the next section). But the important thing to note as you go to set up GA is that you can only access the tool by using a valid Google account.
Here are the steps on how to use Google Analytics for your website. (I’m using my class reunion website as an example.)
Step 1: Create a Google Analytics account.
First, you’ll have to create a Google Analytics account. Or, sign in to your current account.
Before we move forward, you should know that there are currently two versions of Google Analytics: Universal Analytics and GA4.
Step 2: Add the name, URL, and industry of the website you want to track.
Choose which account you want to add the property to.
You should create and name your Property at this point and enter the website’s URL as well as the industry and reporting time zone. Then you’ll be able to Create and Finish this step of the process.
Step 3: Add a Data Stream or View to your property.
Note: GA4 no longer uses “Views” but it instead has “Data Streams” with similar functionality. Keep this in mind when following these steps using Universal Analytics.
To add a view to your Universal Analytics account, go to the account and property you want to add a view to — use the menu to Create a View, name your view, select the type of view (web or app), and answer a few other questions. Remember, you can add up to 25 views to a property in GA.
To add a data stream to your GA4 account, go to the account and property you want to add a data stream to — use the menu to add a Data Stream. Choose or add a stream, and save it.
Step 4: Add your tracking code directly after the <head> tag of your site.
When you create a property, you’ll have access to a unique ID for tracking and a global site tag (code you need to add to each site page you want to measure). This is how you’ll be able to collect data in your property
Then, paste your global site tag right after the opening <head> tag on each site page you plan on measuring.
You’ll be asked to choose your type of site (static, dynamic, web hosting, Google Tag Manager) so that you can set up the data collection accurately.
Step 5: Visit your GA portal and verify the code is working.
Lastly, verify your code is working. You can do this by looking at the Real-Time reports section while clicking around on your site in a different tab or on your phone. The report should show at least one visitor to the site (that’s you!)
And that’s pretty much it! After that review, you may be wondering the following:
Do you need to add the GA code to every page of your site?
That’s a lot of manual work — especially if your website has more than 50 pages. Plus, what happens when you create new pages? Do you need to add the tag every time?!
The short answer is: no.
The longer answer: you only need to add the tag to every page template. So, if you have one-page type on your site (meaning every individual page uses the same header module), you only need to add it to that module — and it’ll be applied to every page
If you have two-page types, you’d need to paste the code into the two separate header modules. Three-page types? Three header modules.
And if you use a CMS like HubSpot, this task is even easier. These tools come with a separate field where you paste your tracking code just once. HubSpot users can follow these simple instructions for adding GA.
Additionally, to set up GA properly, you’ll want to understand the various layers of the tool — specifically, the hierarchy.
Understanding the Basics of Google Analytics
Google Analytics is made up of many parts, so it’s important to have a clear lay of the land as you begin learning. This section is dedicated to Google Analytics guidelines to help you master the basics of this powerful tool.
Google Analytics Hierarchy
Here’s a look at the GA hierarchy. Remember, Universal Analytics uses “Views” while GA4 uses “Data Streams”, so both are demonstrated in the visual below.
Let’s dive into each of the sections within the hierarchy.
The organization is the highest level. It represents a company. For example, our organization is HubSpot, Inc. One organization can encompass multiple GA accounts.
Organizations are recommended for larger businesses, but not mandatory.
Accounts are not optional. Using Google Analytics requires at least one (sometimes several) accounts.
An account doesn’t mean a user account. I can log into the HubSpot Google Analytics accounts using my Google email ID. HubSpot’s head of technical SEO can also log into the same account using his Google email ID. Our historical optimization specialist can also log into the same account using his Google email ID
- You can assign one property to each account or multiple properties to one account. Every account can hold up to 50 properties.
- You can give user permissions for an entire Analytics account, a property in an account, or a view in a property.
You might be wondering, “What’s better: creating a new account for every property or adding every account to the same property?”
It depends on your use case and goals.
For example, suppose you have one website — the Stark Industries corporate site — and five subdirectories, including the Stark Industries blog, careers section, media resources, case studies, and investor relations information.
You want to create separate properties for each subdirectory so the people on each team can look at how their portion of the site is performing, as well as the larger site
But maybe you have another site that discusses Tony Stark’s work with S.H.I.E.L.D. You want the S.H.I.E.L.D. team to see data for this subdirectory, but you don’t want them to see data for the rest of the website. You create a new account and property for the S.H.I.E.L.D. site.
A property is a website or app. Each property can support up to 25 views.
At the minimum, you need two views per property:
One with zero configuration — essentially the “raw” version of the view
One with filters set up to exclude any traffic from within your company (i.e. a filter for your IP address) as well as bots and spam traffic
A view only captures the information after your filters and configured settings have been applied. And once you delete a view, that data is gone forever. For those reasons, it’s critical to keep an unfiltered view of your data.
5. Data Stream
A data stream in GA4 is a flow of data that gives you more insights into how your site is performing across different operating systems. There are three preset data streams you can choose from including web, iOS, and Andriod; or you can choose to create a custom data stream.
6. Google Analytics Dimensions and Metrics
To use GA successfully, you need to understand dimensions versus metrics. I’ve found the easiest way to think about it is:
Dimensions: categorical variables. Simple examples include names, colors, and places.
Metrics: quantitative variables. Basic examples include age, temperature, and population.
Or as my Data Analytics professor put it, “Metrics are what you can do math on.” Not the most eloquent phrasing, but it works.
- Landing page
- Customer type
- Bounce rate
- Session duration
In any GA report, your dimensions are your rows and your metrics are your columns.
Custom Dimensions and Metrics
GA lets you create custom dimensions and metrics from Analytics data plus non-Analytics data. To give you an idea, suppose you track the membership type of customers who have created an account in your CRM. You could combine this information with page views to see page views by member type.
Or maybe you run a blog. If you want to understand how audience engagement impacts other metrics (like conversions, pages per session, etc.), you could create three custom dimensions for each type of reader:
- Advocate: user who shared one-plus posts on social media
- Subscriber: user who signed up for your email list
- Customer: user who purchased premium access
- Using these dimensions will give you invaluable information.
7. Google Analytics Audiences
An audience is a group of users that have something in common. That commonality could be anything: maybe you’re targeting consumers in Australia, so you have an “Australian audience,” or you want to sell to millennials, so you have a “25-34 audience.”
GA comes with several built-in audiences (including the two I just mentioned, location and age). You don’t need to do a thing to set these up — once you have the tracking code installed, GA will automatically break down your visitor data into these audience reports.
However, you can also create custom audiences. Perhaps you’re only interested in “Australian millennials”; you’d need to make a custom audience that only includes visitors who are A) in Australia and B) between the ages of 25 and 34.
Creating an audience is fairly easy. Honestly, the hardest part is figuring out what you’re trying to accomplish and then identifying the user characteristics that’ll help you do that.
Once you’ve done that, follow these instructions to create a new audience segment. From there you can import a segment to use as the basis for your Audience Report.
8. Google Analytics Segments
A segment is a subset of your data. I like to picture an entire pizza made up of all different slices — one slice has pesto and mozzarella, another has sausages and spicy peppers, another has ham and pineapple, and so on. Metaphorically speaking, each slice is a segment.
You can create segments based on:
- Users (e.g. users who have bought something on your site before, users who have signed up for a consultation, etc.)
- Sessions (e.g. all sessions that were generated from a specific marketing campaign, all sessions where a pricing page was viewed)
- Hits (e.g. all hits where the purchase exceeded $85, all hits where a specific product was added to the cart)
- Like audiences, GA provides you with several segments. I wouldn’t stop there: you can get incredibly granular with your segments.
To give you some inspiration, here are a few of HubSpot’s segments:
- Users who viewed a specific product page and watched the demo video
- Users who viewed the same product page and didn’t watch the demo video
- Users who view a specific Academy course page
- Users who view a specific Academy lesson page
- Users who view a blog post and a product page
The sky is your limit — well, that, and GA’s segment cap.
Google Analytics Reports
There are five primary reports available in Google Analytics that can give you insight into your website’s performance. You’ll find these reports on the lefthand size of the screen.
All of these options can be a bit overwhelming. And depending on which version of Google Analytics you have (universal analytics or GA4), you’ll see different reports.
Let’s walk through each report together. First, we’ll start with Universal Analytics reports and then move on to GA4 reports.