top of page

How to Migrate to Google Analytics 4


How to Migrate to Google Analytics 4

Migrating to Google Analytics 4 can be a complex process if you have a lot of customizations in Universal Analytics. However, if your UA setup is basic and you want to migrate to G4 quickly and easily, here are the steps you need to follow:

Step 1: Identify Your UA Setup

Your UA setup can be identified by checking the code snippet in your website source code. There are three main ways UA can be installed:

  1. Analytics.js - This is an older version of the tracking code that looks like this: isogram with GA commands such as GA create and GA send. If you see this code, you are using analytics.js.

  2. Gtag - If you created a Universal Analytics property several years ago, you are probably using Gtag. The code snippet will look like this: gtag with commands such as gtag and gtac config.

  3. Google Tag Manager (GTM) - If you are using GTM to install Universal Analytics, the code will look like this: data layer with an ID that starts with GTM-Dash.

Step 2: Migrate to G4

Follow the appropriate steps below based on your UA setup:

Analytics.js

  1. Create a new Google Analytics 4 property by going to analytics.google.com > admin > create property.

  2. Enter the name of your property, select the correct reporting time zone and currency, and click next.

  3. Answer the questions and click create.

  4. Create a new web stream by clicking web and entering the address of your website.

  5. To switch to Gtag, provide the tracking code to your developer and ask them to implement it on your website.

  6. To migrate to GTM, ask your developer to install GTM code and then configure a new G4 property in it.

  7. Test if G4 is working properly by refreshing the page and checking if the data is being collected.

Gtag

  1. Create a new GA4 property as mentioned in step 1.

  2. Modify your existing Gtag code by adding the measurement ID of GA4 to it.

  3. Start sending data to both GA4 and UA properties by keeping the tracking code for UA as it is.

  4. Test if GA4 is working properly.

Google Tag Manager

  1. Create a new GA4 property as mentioned in step 1.

  2. Create a new Google Tag Manager(GTM) container and provide the GTM code to your developer to install it on your website.

  3. Install GA4 through Google Tag Manager as mentioned in the Analytics.js section.

  4. Test if GA4 is working properly.

GTM with Universal Analytics

  1. Continue using the same GTM container.

  2. Install GA4 through GTM as mentioned in the Analytics.js section.

  3. Test if GA4 is working properly.

Step 3: Configuration

After installing G4, there are a few more configurations that need to be done:

  1. Go to admin > data settings > data retention and switch from two months to 14 months.

  2. Exclude internal traffic by going to data filters.

  3. Mark all the tasks in setup assistant as completed.

Congratulations, you have successfully migrated to Google Analytics 4!


bottom of page