Time is running out for all the bloggers and website owners out there to make the switch to GA4 before the deadline. Otherwise, you will lose the traffic statistics for your website. But trying to find the new GA4 tracking code can be a real pain in the neck. Even though Google keeps nagging you about the switch to GA4, they are still making it quite difficult to actually find the new code that you need to place on your website in order to continue to receive traffic statistics. In fact, to find the page where the tracking script is located, you have to drill down 5 clicks into the layers of Google Analytics. If this were a page on a blog, Google’s search engine would not even index it, or at least it would be a very low-relevance page because it is buried 5 clicks down in the hierarchy of the website. You would think that Google would slap this in your face with a pop-up if they really wanted you to switch to GA4, instead of just opting for some other statistics software for your site that is a little more user-friendly and intuitive.
When does the old Google Analytics stop working?
Google Analytics, also known as Universal Analytics, will stop working on July 1, 2023, as it is being replaced by Google Analytics 4 (GA4).
Quick guide to finding the new GA4 tracking code
To find the tracking code in Google Analytics GA4, follow these steps:
- Log in to your Google Analytics account.
- Click “Admin” in the bottom-left corner of the page.
- In the “Property” column, select the relevant property.
- Click “Data Streams” from the second column.
- Click on the data stream you have, or create one if you haven’t set one up yet.
- Scroll down on the page and click on “Configure tag settings”.
- Click on “Installation instructions” in blue located at the top right of the page.
- To install the tracking code, go to the “Install manually” tab where you can find the complete GA4 tracking script with measurement ID.
- Copy the tracking code by clicking on the copy icon showing on the top right corner of the code block to get the code into your clipboard.
- You should paste the code in the header section of your website to start tracking the traffic details.
Detailed instructions with images for finding the GA4 tracking code
This is how you find the GA4 tracking code. Start by logging into your Google Analytics account. Then click on “Admin” in the bottom right of the screen (the coq wheel).
Select Property
In the “Property” column, select the relevant property. In other words, select your website. Then click “Data Streams” from the second column.
Select the data stream (website)
Click on the data stream you have, or create one if you haven’t set one up yet. With data stream, Google Analytics really means the website you want the code for.
Click on Configure tag settings
This page is a bit confusing. Where is the code? You may think you should click on the copy button to the top right (measurement ID), but this only copies the ID, not the HTML code you need. To find the code we need to click through some more layers of Google Analytics. Scroll down on the page and click on the maybe not-so-obvious “Configure tag settings”.
Installation instructions
Click on “Installation instructions” in blue located at the top right of the page.
Copy script
To install the tracking code, go to the “Install manually” tab where you can find the complete GA4 tracking script with measurement ID.
Copy the tracking code by clicking on the copy icon showing on the top right corner of the code block to get the code into your clipboard.
You should paste the code in the header section of your website to start tracking the traffic details. A suitable position to place this code is right before the </head> tag in the HTML file, which is usually right before the first <body> tag.