The Ultimate Guide to GA4 Implementation

By Raka October 13, 2023

You’re a digital marketer looking for ways to better understand your website traffic. You’ve heard of Google Analytics 4 (GA4) and the many benefits it offers over its retiring predecessor, but you don’t know where to start. In this article, we’ll teach all you need to start your GA4 implementation, connect it to your website, and verify the results.

Creating a GA4 property and data stream

The first step in implementing GA4 is creating a property and data streams for each of your websites. A property is an individual entity within the Google Analytics 4 system that stores data collected from your sites, and a data stream represents the website being tracked in Google Analytics.

To create a property, log into Google Analytics and go to the admin section. Then, click on the “Create Property” button above the property settings. You’ll be asked a series of questions about your business and to verify that you agree to Google’s terms of service. Once you’ve made your selection, you’ll be prompted to set up your data stream. If you do not have an existing analytics account for the website you are looking to track, you’ll be guided through creating a new account and property simultaneously.

To set up your data stream, enter the website URL of the site you wish to track and give the data stream a name; this is simply an identifier for the website being tracked, so it’s best to use something descriptive yet succinct. Additionally, make sure Enhanced Measurement is toggled on. Enhanced Measurement collects more data about interactions on your website, including scroll depth and outbound links. Once you’ve entered all the necessary information, click “Create Stream” to complete the process.

Connecting GA4 to your website

Now that you have a property and data stream set up in the GA4 interface, it’s time to connect it to your website. There are two main methods used to connect GA4 to a website: adding the Global Site Tag to your site or using Google Tag Manager. We cover these in more depth below, as well as a third method for those utilizing HubSpot for their CMS.

Using the Global Site Tag

The first and most direct method of connecting GA4 to your website is by adding the Global Site Tag (gtag.js) directly to your HTML code in the <head> of your site. If you’ve just created a property, you’ll automatically be redirected to the Global Site Tag. To find the gtag.js file at other times, head to your property’s admin panel by visiting the property column and clicking data streams > select the data stream you would like to set up > view tag instructions.

When you’ve completed these steps, you will be presented with two tabs – one for installing with a website builder or CMS, where you can check if your CMS has a specific integration feature, and one for installing manually, where you can attain the Global Site Tag. Once you’ve located the Global Site Tag, copy and paste it into the <head> of every page on your website. After the Global Site Tag has been implemented, it can take up to 24 hours for data to start populating in the GA4 Reports tab.

Using Google Tag Manager in a GA4 implementation

If your website is already set up with Google Tag Manager, you can use GTM to add GA4 to your site. To do this, log into your GTM account and click “New Tag” on the homepage. Select “Google Analytics: GA4 Configuration” from the tag type list and enter your GA4 property ID, which can be found in the same place as the Global Site Tag. Once you’ve selected this, the configuration will populate, and you will need to enter the measurement ID of the corresponding data stream from within your properties admin panel in Google Analytics.

Improve your website performance with our website grader

Once you’ve completed these steps, select “Triggering” at the bottom of the window, then click “All Pages – Page View” to fire the tag on all website pages. You can adjust the triggers to only fire on certain pages or in certain conditions by creating a new trigger and applying it to your GA4 configuration tag. Finally, click “Save” and “Submit” to publish the tag and the changes you’ve made.

Connecting via HubSpot

If you’re utilizing HubSpot for your CMS, you can easily integrate GA4 with your site using their integration feature. To do this, log into your HubSpot account and head to your admin settings. In the left sidebar menu, scroll down to “Website” and select “Pages.” Then select the “Integrations” tab. Before moving to the next step, ensure you set the domain to which you would like GA4 to publish by using the toggle at the top of the page. Please note that if you choose a specific domain versus updating the default settings for all domains, you must override the default settings when moving to the next step. Now that you have set the correct domain, select the option to “Integrate with Google Analytics 4.” Enter your GA4 Measurement ID into the “Measurement ID” field and click save to finish the integration process.

Testing your GA4 configuration

Once you have connected GA4 to your website, it’s important to make sure that the implementation has been successful. The easiest way to do this is by using Google Tag Assistant, a tool that verifies your tags and highlights any errors in their implementation. To use it, simply head to tagassistant.google.com and select “Add domain.” When prompted, input your website domain and click “connect.” When the page loads, Google Tag Assistant will scan for any tags that are implemented on the page and let you know if there were any errors with their implementation.

Once loaded, switch back to the Google Tag Assistant Tab and select the Google Tag you want underneath the URL at the top of the page. If no tags were found, your GA4 configuration has not been activated on the domain, and you will need to troubleshoot by revisiting previous steps. If your tag is displaying, click on the appropriate property ID to view the events that were fired.

Now that we have gone through all the steps of a GA4 implementation to your website, testing it with Google Tag Manager, and verifying its accuracy using Google Tag Assistant, you should be ready to start collecting and analyzing website data. The insights provided by GA4 can help you make more informed decisions about your marketing strategy and maximize the return on investment for your campaigns. With its advanced features, GA4 is an invaluable tool for any marketer seeking greater insights into their website traffic.

Need help getting GA4 off the ground? Raka’s team of experts are certified in Google Analytics 4 and are here to assist you in ensuring you are ready for migration come July 1, 2023. Schedule a time to chat with our team and see how we can help with your GA4 implementation today.

Use our website grader to understand how to improve performance