Google Analytics is one of the most powerful marketing tools that allow you to track and analyze the traffic on your website. Come July 2023, the current version of Google Analytics (Universal Analytics) will be sunsetted. The sooner the new version of Google Analytics is installed on your website, the better!
Google Analytics 4 (GA4) was first released in beta form in 2019. GA4 quickly took the marketing world by storm with the capabilities within the platform. GA4 has also introduced a brand new tracking system. The previous Google Analytics (UA) version collected data through a session-based model. GA4 collects data via event-based tracking, which provides more accurate data.
With the upgrades to GA4, you can gain even more insights into your visitors, including how they found your site, interacted with your content, and converted. This blog will walk you through setting up GA4 on your website.
Step 1: Create a Google Analytics 4 account
The first step to setting up GA4 is to create a Google Analytics account. If you already have a Google account, you can log in and follow the steps below to create a new GA4 property. If you don’t have a Google account, you must create one before proceeding.
To create a new GA4 property in your current Google Analytics account, click on the “Admin” tab in the navigation menu and select “Create Property” from the dropdown. Next, you’ll be prompted to enter basic information about your property, including an account name and URL.
Step 2: Set up a property in your GA4 account
The next step is to set up a data stream for your website. A data stream is brand new to Google Analytics and is used to send data to your property. To set up a data stream, click on the “Data Streams” tab in the property settings and select “Web.” You’ll be required to enter basic information about the data stream, including the URL of the website and the name of the stream.
Step 3: Install the GA4 tracking code on your website
Option 1: Installing the tracking code using Google Tag Manager
I recommend proceeding with this option if you currently use Google Tag Manager (GTM) on your website.
Navigate to GTM, and click “Tags” in the navigation menu on the left-hand side of the screen. Click on “New.” Under the “Tag configuration” section, select Google Analytics: GA4 Configuration. You will need to add the measurement ID to the tag. To find the Measurement ID, navigate to Google Analytics and click on the created data stream. In the top right corner, you will see the measurement ID. Copy the ID and add it to the tag in GTM. Finally, rename the tag to GA4 Configuration.
In the Triggering section, add all pages as the trigger. Once the trigger has been added, click Save in the top right corner.
Finally, click Preview in the top right corner of GTM to test if the tag is working. Once the page loads, you should see the tag firing. Finally, once you confirm the tag is firing, publish the container.
If you are not using Google Tag Manager, you must add a JavaScipt snippet to your website’s header. This code is what allows GA4 to track and analyze the traffic to your site.
To get the tracking code:
- Go to the “Admin” page and click on the “Data Streams” tab.
- Scroll down to view tag instructions and click install manually.
- Copy the code and paste it into your website’s header before the closing </head> tag.
Step 4: Verify that the tracking code is working
After you have installed the tracking code on your website, it’s essential to verify it is working correctly. To do this, go back to GA4, click “Reports,” and finally click on the “Realtime” tab. This report will show you a live view of the traffic on your website, including the number of active users and the pages they visited.
If you see active users on the Realtime report, the tracking code is working properly, and GA4 is successfully tracking your website traffic. However, if you don’t see any active users, it could mean that there is a problem with the tracking code or that it wasn’t installed correctly.
Please note the data can take 1-2 days first to appear.
Setting up Google Analytics 4 is a straightforward process that provides valuable insights into the performance of your website. By following the steps outlined above, you can create a GA4 property, set up a data stream, install the tracking code, and explore the data. With GA4, you’ll be able to track and analyze your audience’s behaviour, identify improvement opportunities, and make informed decisions about your marketing efforts. Whether a business owner or marketer, GA4 is one of the most valuable tools for understanding and growing your online presence.
Need some support setting up Google Analytics 4, or looking for a helping hand with Google Analytics auditing, clean-up, or optimization? Our team of digital marketing experts are here for you. Contact us today to see how we can help.