Migrating from Universal Analytics (UA) to Google Analytics 4 (GA4) involves upgrading your analytics tracking system to the latest version offered by Google Analytics. The migration process can be broken down into two main parts: migrating to GA4 and setting up Google Tag Manager (GTM). In this article, we will discuss the step-by-step process to migrate your website from UA to GA4 and set up GTM.
Migrating to GA4:
The first step in migrating to GA4 is to create a new GA4 property. To create a new property, follow these steps:
- Log in to your Google Analytics account and navigate to the “Admin” section.
- Select “Create Property” and choose “Web” as the type of property.
- Enter a name for your new property and select the appropriate time zone and currency
- Choose “Create” to create your new property.
Once you have created your new GA4 property, you will be provided with a new Measurement ID. This is a unique identifier for your property that you will need to use to track your website’s activity.
Next, you will need to install the GA4 tracking code on your website. The GA4 tracking code is different from the UA tracking code, so you will need to replace the old code with the new code.
The process for installing the GA4 tracking code is as follows:
- Go to the “Admin” section of your GA4 property.
- Select “Data Streams” and then click “Web.”
- Click “Add Stream” and enter the details for your website, including the website URL and stream name.
- Click “Create Stream” to create the new stream.
- Once you have created your new stream, click on “Tagging Instructions” to get the GA4 tracking code.
- Copy the code and paste it into the header section of your website, just before the closing tag.
Setting up Google Tag Manager:
Google Tag Manager (GTM) is a tool that allows you to manage all of your tracking tags in one place. With GTM, you can easily add and remove tracking tags without having to modify the code on your website. Here is how you can set up GTM:
- Create a new Google Tag Manager account, if you don’t already have one.
- Create a new container in GTM and link it to your GA4 property.
- Once you have created your container, you will be provided with a GTM container code. This code needs to be added to your website, just like the GA4 tracking code.
- Copy the GTM container code and paste it into the header section of your website, just before the closing tag.
- Once you have added the GTM container code to your website, you can start adding tracking tags to your container.
Adding Tracking Tags to GTM:
To add a tracking tag to your GTM container, follow these steps:
- Log in to your GTM account and select the container you want to add a tag to.
- Select “Tags” from the left-hand menu and then click “New Tag.”
- Select the type of tag you want to create. For example, if you want to track pageviews, select “Google Analytics: GA4 Pageview” as the tag type.
- Enter the tag configuration details, such as the Measurement ID for your GA4 property.
- Save the tag and then click “Submit” to publish the changes to your GTM container.
- Test the tag to make sure it is working correctly.
Migrating from UA to GA4 can be a bit tricky, but it’s worth the effort to ensure that you have the latest
Disclaimer: Google tag manager belongs to Google property
For Contact: firstname.lastname@example.org
I am available for Hire on Freelancer: Freelancer.com
I am available for Hire on Upwork: Upwork.com
I am available for Hire on Peopleperhour: Peopleperhour.com
I am available for Hire on Guru: Guru.com