How To Setup GA 4
Google Analytics 4 (aka GA4) is the latest version of Google Analytics, which was released in October 2020. Unlike the previous Universal Analytics properties, the new GA4 can be used for a website, an app, or both.
GA4 excels in tracking the latest market trends and customer behaviour across devices and platforms, thanks to Google’s powerful machine learning models. The privacy-centric design offers a higher return on investment, which is especially important for long-term marketing strategies.
We’ll go through how to create a new GA4 account, how to upgrade to a new GA4 account, and how to apply the GA4 tag to your website in this post. Continue reading for a detailed step-by-step guide with screenshots. Let’s look at one of the most basic (but fundamental) topics in today’s blog post: how to install Google Analytics 4. We’ll utilise Google Tag Manager to accomplish this (because my blog heavily focuses on it).
The steps to install Google Analytics 4 using Google Tag Manager are as follows:
- Make a brand-new GA4 property.
- Construct a data stream (in this blog post, I focused on the Web Stream)
- Take note of the Measurement ID.
- Add a Google Analytics 4 Configuration tag to your website.
- Set the tag to fire on all pages and paste the Measurement ID.
- Test/preview the new tag
- Changes should be published in Google Tag Manager.
How to Install GA4
If your website does not already have Google Analytics tracking, the first step is to go to Google Analytics and create a new account and property for it. If you already have a Universal Analytics property for this site, go to the Admin section and click on ‘GA4 Setup Assistant‘ in the Property column. This will create a GA4 property that will operate alongside your Universal Analytics property.
After you’ve created a new property in GA4, you’ll need to find the data stream measurement ID. Click ‘Setup Assistant’ under the Property column in the Admin area of your new GA4 property.
The Data Streams screen will appear when you click on ‘Tag installation’ under the Collection title. There will be no streams here if this is a new property, so click ‘Add Stream,’ select Web, and follow the steps. If one is already present, clicking on it will display information about the webstream.
The Measurement ID can be located in the top-right corner of the Webstream details pop-up (highlighted in blue in the screenshot below). This ID should be copied. It might come in handy at a later point. You can also enable or disable Enhanced measurement from this menu. It’s a good idea to keep it turned on. This is also where you may change how your website’s tagging is configured.
Use the flow chart in our blog to figure out which of the sections below applies to you, and then follow our instructions to add GA4 tags to your site.
How to Add GA4 Tags to Your Website
- Add the Global Site Tag to your site directly.
The default tab under Tagging Instructions is Add new on-page tag. If you choose Global Site Tag (gtag.js), code with your GA4 measurement ID will be sent. This code should be copied.
This code should be placed as the first item in the head> of every page of your site that you want to track with Analytics. Alternatively, you may have a CMS that manages your site’s tracking code area; in that case, paste the complete code there.
- Check out GA Realtime for more information.
You can use the real-time report to verify that your GA4 tracking is working properly after you’ve set it up. In the left-hand sidebar of your GA4 property, select Real-time.
- Open your webpage in a new tab or window.
You should notice a new user in the real-time report. You may double-check that it displays a user for your area and the sites you’re looking at are right. Please be aware that there may be a minor delay, and you may need to wait a few minutes for your user or page modification to appear in this report. This report can also be used to see if any GA4 event tracking is working. If everything appears to be correct, congratulations!! Your site’s GA4 tracking has been set up successfully.