MeasureSchool logo
Search
Close this search box.
Search
Close this search box.

Google Analytics 4 Tutorial for Beginners

Last Modified on February 1, 2024

Are you looking to kickstart your GA4 adventure?

In this Google Analytics 4 tutorial for beginners, you will learn what GA4 is and why it is essential for online businesses.

GA4 For Beginners

Master the basics with our FREE GA4 Course for Beginners

Working with GA4 is about having the ability to take action based on the data you have gathered.

By the end of our Google Analytics 4 tutorial for beginners, you will be proficient at GA4, even if you are new to this tool.

Here is an overview of what we’ll cover:

We have lots to cover, so let’s dive in!

Google Analytics 4 Tutorial for Beginners: The Basics

First, let’s take a look at the interface.

Google Analytics 4 interface

Here, we have the GA4 Google Merch Shop demo account.

GA4 Google Merch shop demo account

Google provides this fully functional Google Analytics account for any user to access. It is connected to the Google official merchandise store, giving you access to diverse data sets you may not possess.

Google’s official merchandise store

It provides a way to explore existing business data and experiment with Google Analytics features.

💡 Top Tip: Check out our guide on the Practical Values of the Google Analytics 4 Demo Account to learn what account types and data sources are available for testing and how to access the GA4 demo account.

What is Google Analytics 4 all about?


Whether you’re an online store owner, you have a blog or a SaaS business, you probably have decisions to make. These decisions may involve deciding whether you change something on your website.

To determine what things you can do and how you can optimize them, a helpful thing to do as an online business owner is to look at your numbers.

Google Analytics is a tool that lets you track all your different user interactions. Google Analytics 4 is the latest (and now the only) version of Google Analytics.

When users go to your product page, add a product to the cart, or check out and buy something from your store, you can track all these with Google Analytics 4.

Once you’ve tracked this data, you can use GA4 as your answering machine. You can go into the tool and say, “How many people visited my website last month?“

Here, we see that in the last 28 days, we had 68K users and $127K total revenue.

Last 28 days reports snapshot

There are more things we can look at. We can see the number of users that visited our website in the last 30 minutes and which countries they come from. We can also get some insights into our data.

Users in the last 30 minutes and insights cards

We can determine which channels our users come from and which campaigns perform best.

Users by default channel group and top campaigns

Finally, we can also see the locations where our users come from.

Users by country card

These are just a sliver of what you can do with GA4. There are more tools to it. When we do marketing analytics, for example, we dive right into the user acquisition reports that let us know how users come to our website.

Go to AcquisitionTraffic Acquisition.

Going to the traffic acquisition report

Here, you can see a table of the users that came through, the number of sessions, engaged sessions, and average engagement time per session.

Users, sessions, engaged sessions, and average engagement time per session

We can quickly look at a channel and determine how many people came and how long they stayed on our website. We can also learn the engagement rate, conversion rate, and how many conversions they generate.

Conversions are actions that you want your users to take on your website. With Google Analytics 4, you can track these easily.

After building out your tracking and making it more custom to your platform, you can gather more insights about your business. Let’s look at what data we can collect for a website.

Go to MonetisationE-commerce Purchases.

Going to the eCommerce purchases report

Here, we can see a list of the items we sell in our store, the number of times users viewed them, added them to the cart, purchased them, and how much revenue we generated.

Table of items in the eCommerce store

Next, we can go to the User Purchase Journey report.

Going to the user purchase journey report

You can look at the funnel of how many people entered your store, viewed a product, added it to the cart, began checkout, and purchased, along with the equivalent abandonment rates.

User purchase journey funnel

In the Tech Overview report, you can find more information about your users, like what devices they use to arrive at your website and which operating system.

Top devices and operating systems in the tech overview report

All of this will inform you about who is visiting your website, where they come from, and what they do once they are on your site.

It also lets you ask specific questions about your business. Then, hopefully, you can take action based on what the data shows you.

For example, if you have many Android users coming to your website, you could check the Android compatibility of your website, see if people can make a purchase without issues, or if there is anything you can optimize.

It is a crucial step in any digital analytics process. You need to make a recommendation and take action on that data – this is how you can get an ROI on your analytics investment.

Why do online stores often use Google Analytics on their website?

Multiple other tools can do web tracking and web analytics for you. Some share many similarities to GA4, but the big differentiator with Google Analytics is that it’s free.

🚨 Note: If you are interested in what other analytics tools are available and their capabilities, check out our list of the Top 5 GA4 Alternatives.

Nowadays, GA4 is a must-have for whoever is operating a professional website. One drawback of Google Analytics, however, is that it is not as intuitive when you look at the interface.

Do not feel overwhelmed with all this data. We are going to discover all of this together.

Let’s kick off our Google Analytics 4 tutorial for beginners by installing Google Analytics on our website!

Installing Google Analytics 4 on Your Website

To start, go to the Google Analytics website.

Signing up to Google Analytics

If you are setting up Google Analytics for the first time, you must have a Google account ready.

After logging into your Google account, we will see this overview for setting up your GA4 account.

Steps for setting up a Google Analytics account

In Google Analytics, we have accounts and properties. An account acts like a container in which you put your properties. Usually, you would choose your company name as the account name if you have multiple websites (properties).

Let’s call this account Company LLC.

Providing an account name

Next, we can go through the Account Data Sharing Settings with Google. If you want to tweak which data you share with Google, read through and adjust these settings.

Account data-sharing settings

Once you have finished your data sharing, click Next.

Going to the property creation settings

Next, we’ll get to the property settings. If you have several websites, you can create a property for each and store them in a single account.

In our case, we have a property here, which is our demo shop.

MeasureSchool demo shop

Then, we have the property details. We need to provide a name, reporting time zone, and currency.

Choosing the correct reporting time zone is vital because we need to sync it to whatever time zone you are working on or align it to your backend. Afterwards, pick the currency. The currency is vital when you are working with an eCommerce website.

Let’s go with Demoshop for the name, select the United Kingdom for the time zone, and use the US Dollar as the currency. Finally, click Next.

Property creation settings

Then, we’ll go to the business details section. Google wants some information about your business to help them understand your business better and tailor your experience to your business type.

First, we should provide our industry category. In our case, we have a Shopping website. Next, specify the business size. Let’s go with Small. Then, click Next.

Business details settings

Next, we get to the business objectives.

Business objectives settings

Your selection here decides what reports you can see in the interface later. I want to keep it generic, but feel free to choose whatever suits you and your business best.

I’ll go with the Get baseline reports option and click Create.

Creating an account and property with baseline reports

Next, go through the Terms of Service agreement. Read through all of this and check the data processing terms. Finally, click I Accept.

Accepting Google Analytics terms of service

Finally, we are at the last step, which is data collection. We’ll get to this step later in our tutorial, so click Skip for now.

Skipping the data collection step

We are almost there. We only need to set everything up. Click Continue to Home.

Continuing to the Google Analytics home

We are now in our brand new Google Analytics account.

Newly created Google Analytics account

No data is flowing into our account yet. So, let’s go ahead and set it up now.

🚨 Note: If you’re hesitant about changing something on your website while still testing how GA4 works, consider making a demo website for all your testing needs.

Your case might be completely different from what we are showing here. If you are running a website on Shopify, Magento, a completely different CMS, or it’s even self-built, you can still follow the steps. They will only differ a little from what we are doing.

💡 Top Tip: We have created more specific tutorials for Shopify and ThriveCart websites that you might want to check out. Follow our guides on the new Google Analytics 4 Shopify Connector and ThriveCart Tracking with GA4 and GTM.

We’ll set up data collection for a website built on WordPress. So, try to follow along even if you don’t use WordPress since the process is general.

First, we must set up a data stream to start measuring inside Google Analytics. Go to the Admin section. Then, click Data Streams.

Going to the data stream settings

Data streams are the sources of data that go into your account.

You can send data between different platforms such as from a website, an Android app, or an iOS app, and theoretically, through a measurement protocol.

For our case, we are looking at a website, so select Web.

Creating a web data stream

We need to provide our website URL to set up a web stream. Go to our demo shop and copy the URL.

Copying the demo shop website URL

Paste the URL back into Google Analytics. Next, name our stream Demo Website. If you have multiple data streams, you should easily distinguish this from them.

Then, we have the enhanced measurement option. These are a bunch of data that Google Analytics will try to gather for you automatically. We’ll leave this turned on and look at it later on. Click Create Stream.

Creating a data stream for the demo shop

Here, we get the web stream details and the instructions on installing our Google Analytics code onto our website. Google automatically detected that we were tracking a WordPress website and were using the WooCommerce plugin.

WooCommerce plugin on the demo shop

Using a plugin is one way to install Google Analytics on our website. The plugin deploys a JavaScript code in the background that gathers your data.

We can see the exact code by going to the Install Manually tab. The Google tag below needs to be installed on all the pages of your website for Google Analytics to work correctly.

The Google tag JavaScript code

You might be intimidated and not want to do anything with code, but it’s only a copy-and-paste method. Depending on your website and its complexity, you might want to get some help from a developer to install this.

There are three methods for installing GA4 on your website.

The first method is using plugins. If your CMS is popular and has a plugin store or extensions, there is likely a way to install Google Analytics to your website without coding.

You can install a plugin onto your website and enter a measurement ID or tag ID. For example, here we have our tag ID.

Copying the tag ID

Next, let’s go into the backend of WordPress, for example. Go to PluginsAdd New.

Adding a new plugin in WordPress

Search for available Google Analytics 4 plugins. Here, we have over 400 search result items.

Looking for GA4 plugins in WordPress

The second way to install Google Analytics is by doing it manually. We will take this code and place it in the HTML source code of your website.

Go to your website, right-click on the page, and select View Page Source.

Viewing the page source of the demo shop

Viewing the page source opens up the HTML your browser downloads from the server.

Opening the HTML source of the demo shop

We need to place the Google Analytics code here for your GA4 tracking to work, and you need to do this for all the pages on your website.

Now, the third way is my preferred way of installing Google Analytics. It’s a more involved process with a few more steps, but it will set you up for the future.

My recommended method is to use a tool called Google Tag Manager.

Installing Google Tag Manager on Your Website

Google Tag Manager is a tag management system where you can set up certain tags like these Javascript codes.

If you do any professional digital marketing, you will deploy multiple tags and need some way to manage them. You would copy all these tags into your code base or use a tag management system like Google Tag Manager.

To set it up, go to tagmanager.google.com. Then, you need to create a new GTM account. Let’s model what we did inside GA4.

Let’s use Company LLC as the account name and select the United States for the country.

GTM account setup

Next, we will set up our container. Containers work similarly to properties in GA4. They represent the type of your digital property. You will store all your tags, triggers, variables, and other related configurations within your GTM container.

Let’s use our website URL for the container name. Next, our target platform is the Web since we use a website. Finally, click Create.

Creating the GTM account and GTM container

Read through the TOS and tick the checkbox below to accept the conditions.

Accepting the terms of service for creating a GTM account

Finally, click Yes at the top to confirm.

Final check for accepting the terms of service

Great! We have successfully created a Google Tag Manager container. To install GTM on our website, we only need to copy two pieces of code onto every page.

Google Tag Manager installation instructions

Again, there are plugins out there that you can use to make this easier. We will do this manually to show you the process.

💡 Top Tip: One plugin we can recommend for WordPress users is the GTM4WP or Google Tag Manager for WordPress plugin. If you need detailed instructions on how to use it, follow our GTM4WP Plugin Guide.

Let’s start with the first code. Copy the code.

Copying the first GTM code

Let’s go back to the backend of our demo store. Go to AppearanceTheme File Editor.

Opening the WordPress theme file editor

Next, open the Theme Header or the header.php theme file.

Opening the theme header file

We will apply this theme file on all pages, so any change we make here will apply to all the pages.

Let’s dig through the code and look for the head section. Let’s paste the GTM code after the meta tags.

Pasting the first GTM code in the theme header file

Next, we have the second code that we need to place immediately after the body tag. Copy this code.

Copying the second GTM code

Paste this code right after the body tag, then click Update File.

Updating the theme header file with the GTM codes

We now have GTM installed on our website. Let’s quickly verify if the code is running.

Go back to our demo shop and reload the page. Next, view the page source. We should now see the GTM code in the source code.

Updated source code with the GTM code

Great! Another check is to go into the GTM preview mode. Go to your Google Tag Manager account and click on Preview.

Opening the GTM preview mode

The preview mode puts the browser into a state where we can test our marketing tags before we deploy them live on our website.

Paste our website URL, then click Connect.

Connecting GTM to the demo shop

Here we go! Our demo shop will open in a new tab, and we should see that the Tag Assistant is connected. If you see this, it means that GTM is now installed on the website correctly.

With GTM installed, we can take our GA4 code and deploy it to our website through Google Tag Manager. We no longer need to touch the code anymore.

Go to Tags → New. Next, select the Google Analytics: GA4 Configuration tag template.

Using the GA4 configuration tag template

The New Google Tag Update

If you do not see the GA4 configuration tag, Google may have already replaced it with the new Google tag. Google announced they would replace the GA4 configuration tag with the Google tag. Both tags work the same.

Here is a diagram showing the difference between the two tag templates.

Comparison between the GA4 configuration tag and the new Google tag

If you configured a GA4 configuration tag before, Google will automatically upgrade it.

🚨 Note: To learn more about this update, check out our article on the New Google Tag.

Here, we need to provide our measurement ID or tag ID, which we can get inside GA4. Next, check the option to send a page view when the configuration tag loads. If you use the new Google tag, you will not see the page view option, but Google enables it by default.

GA4 configuration tag configuration

Next, we need to define the trigger.

Setting a Trigger

Triggers are rules on when you want to deploy your marketing tags. You can set rules to fire at specific pages or fire tags on all pages.

Click on Triggering.

Setting the trigger for the GA4 configuration tag

Select the All Pages trigger.

Selecting all pages

Give a name to our tag, and then click Save.

Saving the GA4 configuration tag

We need to update our preview mode to try out our changes to the workspace. This mode only deploys our tags to our browser, so we can test it before publishing them on our website.

Click the preview button again and connect the Tag Assistant to our website. Here, we have fired our GA4 configuration tag successfully.

Successful firing of the GA4 configuration tag

With our GA4 configuration tag, we should theoretically be sending data to Google Analytics. To test this, we can go into the admin section of GA4. Here, go to the DebugView.

Going to the GA4 DebugView

GA4 DebugView

A crucial part of our Google Analytics 4 tutorial for beginners is learning how to test your implementations. With the DebugView, you can see all the hits from our browser.

The DebugView tries to show you events in real time, but batching occurs in the background. It usually takes a few seconds before seeing any hits.

GA4 DebugView interface

For new websites, it will usually take up to a couple of minutes before any results come in. If you still have problems getting hits, try to go from page to page on your website.

Let’s open the beanie product page.

Going to the beanie product page

Great! We are now registering events in the DebugView. If we click on an event, we can look at the data that comes into GA4.

Click the page_view event.

Opening the page_view event in the DebugView

Here, let’s check the page_location. This parameter should contain the URL of the page we just visited. It says we are on the beanie product page, which is correct!

Checking the page_location parameter of the page_view event

Let’s go to another page again and confirm if events and parameters update correctly.

Go to FormNewsletter Sign Up.

Opening the newsletter sign-up form

Open the new page_view event and check the page_location parameter. The URL should now be for the newsletter sign-up form.

Checking the page_location parameter of the new page_view event

Great! We are now sending data to Google Analytics properly. However, don’t forget that this is only for our browser. We need to submit a version of our container to publish our changes live on our website.

Click Submit.

Submitting a version of the GTM container

Provide a version name so we can easily distinguish the different versions. Click Publish.

Publishing the GA4 configuration tag

If anything goes wrong, you can restore previous versions of your tag implementation.

Published versions of the GTM container

It is a refreshing system of Google Tag Manager. That is why it is my preferred way to install any tracking. This ability will be helpful in the latter section of our tutorial when we customize our GA4 installation.

🚨 Note: The steps we discussed for installing GA4 with GTM cover only the basics of the process. Our tutorial for Installing Google Analytics 4 with Google Tag Manager covers it in more detail.

Now that we have data flowing into our GA4 account, we need to ensure that the processing of that data is correct. We can influence this with some configurations.

Key takeaways:

  • DebugView for Testing: DebugView in Google Analytics 4 is crucial for testing and verifying real-time event tracking on your website.
  • Real-Time Event Tracking: It displays events such as page views in real-time, though there may be a slight delay due to data batching.
  • Verifying Event Data: By navigating to different pages (like a product page or a newsletter sign-up form) and checking the page_location parameter in DebugView, you can confirm if events and their data are being captured correctly.
  • Publishing Changes with Google Tag Manager (GTM): To make tracking live on your website, you need to submit and publish a version of your GTM container. This process allows for easy management and rollback of changes if needed.
  • Ensuring Accurate Data Processing: After setting up data flow into GA4, it’s important to configure and verify the correct processing of this data for accurate analytics.

GA4 Configurations

Inside the admin section of our GA4 account, the account settings are all listed on the left, and the property settings are on the right.

Your configurations will mostly depend on your website, what data you’re gathering, and what you’re trying to achieve with it. However, below are a couple of base configurations that can apply to any account type.

Go to Property Settings.

Opening the property settings

We looked at the property details in the setup stage earlier. If you made a mistake earlier, you can correct them here.

GA4 property details

In the Data Streams, you can connect multiple streams you want to track in parallel, choosing between an iOS app, an Android app, or a Website.

GA4 data stream settings

Then, we have Conversions. It is essential to set up your conversions properly. We’ll skip this for now and discuss it later.

Conversions are related to events, and we’ll get to event tracking once we customize our installation.

Conversions section in the GA4 admin settings

The most important setting that many people forget is under Data SettingsData Retention.

Data retention settings

Data retention sets how long Google Analytics will hold onto your data. By default, it is two months.

For privacy reasons, two months might make sense for your business. However, I usually tell clients to go for a maximum of 14 months. Next, click Save.

Changing the data retention settings to 14 months

Next are the Data Collection settings. One to take note of is the Google signals data collection.

Google signals data collection

If you want to make GA4 into a data-gathering machine for advertising, turn on Google Signals. These settings are privacy-relevant, so take the time to read through these extra settings.

You can keep this setting off if you only want to use GA4 as an analytics solution.

Moving on to the Reporting Identity.

Reporting identity settings

The reporting identity dictates how Google Analytics associates events with your users. We can choose between Blended or Observed. By default, Google uses the Blended method, which uses modeled data on top of the user ID, device ID, and Google signals.

Blended reporting identity

The blended method utilizes machine learning, where you feed your raw data into Google Analytics, and their model will try to figure out if somebody converted or not.

Next, we have the reporting attribution model. You can access this by going to the Attribution Settings. By default, Data-driven is the attribution model used.

Data-driven attribution model

The data-driven attribution model uses an algorithm to give credit to different touchpoints. The algorithm combines historical data from your account with AI modeling to determine how to credit each channel.

The other attribution model we can pick is the Last Click. As the name implies, it gives credit to the last touchpoint.

Finally, below are a couple of ways to connect Google Analytics to other products from Google.

For example, we have the Google Ads links.

Google Ads product links

I recommend linking the two products if you run ads on Google Ads and use Google Analytics to see user insights. Syncing up the two products lets you get richer insights.

Here, you need to be logged into the same Google account and click Link.

Linking Google Ads to Google Analytics 4

Next, the link setup is relatively simple. Select your Google Ads account, configure some settings, and establish the connection.

Google Ads and Google Analytics 4 link setup

💡 Top Tip: Check out our guide on How to Link Google Ads to Google Analytics 4 to see how to import your conversions, find Google Ads data in GA4, and determine why there could be discrepancies between the data presented in each tool.

Second, we have something called BigQuery.