GA4 launched in 2020 as an updated version of Google Analytics. It’s a free tool that helps you measure traffic and engagement across a range of platforms, and using it effectively means you can fine-tune your digital strategy. In this blog, we’ll guide you through the process of setting up and using your Google Analytics tracking ID so you can start collecting valuable data on your app or website.
What is a Google Analytics Tracking ID?
A Google Analytics tracking ID is a unique code that each website or app gets when you set up Google Analytics, a popular tool used for monitoring user behaviour. This ID is necessary during the installation process to ensure the data that shows what users are doing gets sent to the right account in Google Analytics.
By using this tracking ID, you can easily track and analyse how users are engaging with your website or app.
Universal Analytics
Before Google Analytics 4 (GA4), Universal Analytics (UA) was used, and each property had a tracking ID to identify it. The tracking ID followed the format “UA-XXXXX-Y”. Each element of this ID indicated something specific:
- “UA” indicates Universal Analytics
- “XXXXX” is a series of numbers representing your account ID
- “Y” is the property number within that account
This structure helped organise and track data for different properties under the same account.
GA4
In Google Analytics 4 (GA4), the tracking ID for a website is now called the measurement ID, though it's often referred to as the Google tag ID. This ID follows the format “G-XXXXXXX,” where:
- “G” indicates Google
- “XXXXXXX” is a unique alphanumeric code
This special tracking code can be used to manually install GA4 on a website or app, allowing you to effortlessly monitor and analyse user activity.
How to Find Your Google Analytics Measurement ID
To find your Google Analytics Measurement ID, there are certain steps you need to take:
- Sign into your Google Analytics account
- Go to Admin in the bottom right hand corner of the correct GA4 property
- Go to the property settings and click the Data collection and modification dropdown
- Click Data streams and choose a data stream
- Refer to the Measurement section
- You can copy the code by clicking the icon next to it
How to add GA4 to your website
GA4 offers a range of powerful features that provide deep insights into how visitors interact with your website or app. There are three ways you can set up GA4 to help you start tracking and analysing.
1. Install via CMS
Many website builders and CMS platforms like Magento, Shopify, and WordPress offer native support for GA4 or plugins that allow you to integrate the tool. It’s a relatively easy setup, you generally just have to enter your measurement ID into a Google Analytics field.
To find more in-depth instructions for your platform, you need to:
- Sign in to GA4
- Open or create your property
- Go to Admin > Property settings > Data collection and modifications > Data streams
- Click a data stream
- Go to the Google tag section
- Click Configure tag settings
- Click Install instructions
- Click Select your platform
- If your platform is available, select it from the list
- Here you will find your Google ID tag and the instructions you need to add it to your website or app
2. Use Google Tag Manager
Google Tag Manager (GTM) is a free tool that helps you manage Google tags including those used for GA4 installation. It’s a streamlined process that lets you add tags without needing to alter the code directly.
Here’s how to set up GA4 with GTM.
Set Up GA4 with GTM
- Create a GTM account
- Create a container to house all your tags and configurations
- Install the container on your website
Configure GA4 in GTM
- Open the relevant container in GTM
- Click Tags in the sidebar and then New to create a new tag
- Go to Tag configuration
- Click Google Analytics: GA4 configuration
- Enter the Measurement ID for your GA4 property in the Tag ID field
- Set up the trigger by clicking on Triggering to set up when the tag will fire
- Select All pages to send page view events every time someone visits your website
- Save the tag by clicking Save
- Click Submit at the top right of the screen
- On the next screen, click Publish
- You can provide a name and description for the tag configuration to document the changes
- Click Continue to finish the publishing process
3. Manually Add the Code to Your Site
Manually installing GA4 on your website or app means you have control over the tracking setup, allowing for a more tailored and precise implementation. Here’s how to do it:
- Log into Google Analytics
- Open or create your GA4 property
- Go to Admin
- Under Property settings, select Data collection and modification
- Click Data streams
- Select a web data stream
- Scroll down to the Google tag section
- Click Configure tag settings
- Click on Installation instructions
- Go to the Install manually tab
- Copy the Google Analytics code provided by clicking the icon in the upper right
- Open your website’s HTML files or webpage templates
- Paste the tracking code immediately after the <head> tag:
<!DOCTYPE html>
<html>
<head>
<!-- Insert GA4 tag here -->
<!-- Other <head> elements like CSS links, meta tags, etc., go here -->
</head>
<body>
<!-- Website content here -->
</body>
</html>
Once you have done this, return to the GA4 page you were on last and enter your domain in the 'Test your website (optional) field'. Click Test to check everything is working properly
Start collecting and analysing your data
Now you have the Google Analytics tracking code installed, you can start gathering valuable insights into your website's performance.
By adding GA4 to your website, you can:
- Verify data collection by checking the Realtime report in your GA4 property
- Set up key metrics like page views, user engagement, and conversions
- Dive into user behaviour reports to understand visitor navigation
- Identify areas of improvement
- Create custom reports to visualise your data more effectively
And much more. By following the steps above, you can gather detailed data and uncover valuable insights to help you create an effective digital strategy.
Need help with your Google Analytics tracking?
At 427 Marketing, we’re experts in all things Google Analytics. We keep up to date with the latest GA updates and features and know how to leverage them for your benefit, helping you grow your website using the data you collect. Speak to us today to see how we can boost your online presence through Google Analytics tracking.