Upgrade to GA4 on WordPress

How to upgrade to GA4 on WordPress?

GA4 is the latest version of Google Analytics. You can use it for a website, an app, or both a website and app together. Universal Analytics properties only support websites. Google has made GA4 the default experience for analytics properties and strongly encourages users to upgrade to Google Analytics 4 properties.

In this guide, I will show you step by step how you can upgrade your WordPress website from universal analytics to GA4. You don’t need to be an expert to follow the article, all you need is access to your WordPress site and Google Analytics account.

Upgrade to GA4 on WordPress

Setting up GA4 properties shouldn’t interfere with universal analytics, your Universal Analytics property is left unchanged and continues to collect data. When upgrading to GA4, it creates a brand new property for your WordPress site.

Let’s begin and explain what you need to do to migrate your WordPress to Google Analytics 4.

1- Navigate to Google Analytics and click Admin

2- Select GA4 Setup Assistant in the Property column

This image has an empty alt attribute; its file name is admin-tab-google-analytics-1024x493.jpg

3- Click Get started under “I want to create a new Google Analytics 4 property”

This image has an empty alt attribute; its file name is create-new-property-ga4-1024x328.jpg

4- Click Create Property

This image has an empty alt attribute; its file name is create-property-ga4-wizard-1024x457.jpg

Once this process is complete, you should have a GA4 property and it’s time now for tag installation on your WordPress Pages.

Add GA4 tag directly to your website

To add the GA4 tracking code to your WordPress website, you’ll need to have access to your WordPress theme. Ask your web developer to perform these steps if you’re unable to do this yourself.

1- Navigate to your GA4 property and Click Admin.

2- Click Data Streams, then Web. Click the data stream.

This image has an empty alt attribute; its file name is data-stream-ga4-1024x544.jpg

3- Under Tagging Instructions, click Add new on-page tag and look for “Global Site Tag (gtag.js)”. Your Analytics page tag is the entire section of code that appears in the screenshot. Copy this code, we will use it later.

This image has an empty alt attribute; its file name is add-a-new-tag-to-page-ga4-1024x587.jpg

4- Log in to your WordPress website and click Appearance > Theme Editor

5- Find your theme header, it should be header.php

6- Paste the GA4 tracking code after the <head> tag then save

How to check if GA4 is installed correctly on WordPress

You can then use the real-time report to verify that you’re receiving data. With Realtime, you can immediately and continuously monitor the activity on your website, so make sure to visit your WordPress website and navigate to the report tab.

This image has an empty alt attribute; its file name is realtime-report-ga4.jpg

Leave a Comment

Join our Mailing list

We don't send too many emails, but when we do it'll be stuff you actually want to read. Join over +1000 digital experts now!