Are you looking to switch to the latest Google Analytics version?
Google is recommending website owners move to the new Google Analytics 4 because it sunset the previous Universal Analytics on July 1, 2023.
In this article, we will show you how to easily switch to Google Analytics 4 in WordPress.
Why Switch to Google Analytics 4?
Google Analytics 4 (GA4) is the latest version of Google Analytics. It lets you track your mobile apps and websites in the same account and offers new metrics, reports, and tracking features.
If you haven’t created a GA4 property yet, then now is the best time to switch to the latest version. That’s because Google closed down the old Universal Analytics on July 1, 2023.
What this means is that Universal Analytics will no longer receive and process data from your WordPress website. You can access your past data for now, but it will eventually stop showing old reports by July 2024. That means that all your old analytics data will be lost.
Switching to Google Analytics 4 will protect you from starting from scratch with no historical data. This way, you can future-proof your data while giving yourself plenty of time to learn the new Google Analytics dashboard and features.
That being said, let’s see how you can switch to Google Analytics 4 in WordPress.
Creating a Google Analytics 4 Property
If you already have an existing Google Analytics account using the old version, then you can easily create a new GA4 property and start sending stats to GA4.
First, you will need to visit the Google Analytics website and log in to your account.
After that, head over to the ‘Admin’ settings in the bottom left corner.
If you are on classic Google Analytics, then you will see the option to set up GA4.
Go ahead and click on ‘GA4 Setup Assistant’ under the Property column.
In the next step, the setup assistant will give you 2 options. You can create a new Google Analytics 4 property or connect an existing one.
Since we are setting up a new property, simply click the ‘Get Started’ button under the ‘I want to create a new Google Analytics 4 property’ option.
A popup will now appear with the details about the setup wizard.
If you’ve implemented your Universal Analytics using the Global Site Tag (gtag.js) code, then you’ll see an option to Enable data collection using existing tags.
This uses the existing tracking code on your site to collect information. That said, if you don’t already have the right tracking code on your website, then we will show you how to add it to your WordPress blog below.
For now, you can go ahead and click the ‘Create property’ button.
The setup wizard will add a new GA4 property and copy the Universal Analytics property name, website URL, timezone, and currency settings.
You can now view your new Google Analytics 4 property in the GA4 Setup Assistant.
Next, you’ll need to click on the ‘Go to your GA4 property’ button to see your Google Analytics tracking code.
From here, you can click on the ‘Collect website and app data’ option and select the ‘Manage data streams’ option.
You should now see your new GA4 property under Data Streams.
Go ahead and click on your new property.
A new window will slide in from the right, and you’ll be able to see your web stream details.
Note: Google Analytics 4 uses both ‘data stream’ and ‘web stream’. These both simply mean the flow of analytics data that Google Analytics receives from your website.
Simply click the ‘View tag instructions’ button at the top.
Next, you’ll see different ways to connect your WordPress site with Google Analytics.
For instance, Google Analytics can connect with a website builder or a WordPress plugin.
You can also manually add the tracking code to your site.
Simply switch to the ‘Install manually’ tab to view the code.
One thing you need to know is that Google Analytics 4 reports are quite different than what you are used to in Universal Analytics.
They have introduced new terminology, and many familiar metrics and reports are missing completely. Basically, if you were using common reports like the Top Landing Pages report or others, then you would have to recreate those from scratch in Google Analytics 4.
It will help you see all the familiar analytics reports right in your WordPress dashboard and make it easier to find the data you need for decision-making.
Not to mention, with MonsterInsights, you get all the powerful tracking features such as outbound link tracking, author tracking, and more, which can be enabled without writing any code.
Let’s take a look at how to easily set up Google Analytics 4 on your WordPress site with MonsterInsights.
Adding Google Analytics Tracking Code to WordPress Site
The best way to add Google Analytics tracking code to your WordPress website is by using MonsterInsights. This is the plugin that we use on WPBeginner.
MonsterInsights is the best Analytics solution for WordPress, and it’s trusted by over 3 million websites because it lets you easily set up advanced tracking without any coding skills.
You can use the MonsterInsights Lite version to set up Google Analytics in no time. There are also premium MonsterInsights plans that offer more features like custom dashboard reports, email summaries, scroll tracking, eCommerce tracking, premium integrations, and more.
First, you’ll need to install and activate the MonsterInsights plugin. For more details, please see our guide on how to install a WordPress plugin.
Upon activation, you’ll be taken to the MonsterInsights welcome screen in your WordPress dashboard. Simply click the ‘Launch the Wizard’ button to add Google Analytics to your site.
After clicking the button, the setup wizard will ask you to choose a category that best describes your website.
You can choose from a business website, publisher (blog), or online store. Once you’ve selected a category, click the ‘Save and Continue’ button.
In the next step, you’ll need to connect MonsterInsights with your WordPress site.
Go ahead and click the ‘Connect MonsterInsights’ button.
Once you click the button, you’ll need to sign in to your Google Account.
Simply select your account and click the ‘Next’ button.
Next, MonsterInsights will require access to your Google Analytics Account.
MonsterInsights App needs these permissions so it can help you set up analytics properly and show you all the relevant stats right inside your WordPress dashboard.
You can click the ‘Allow’ button to continue.
After that, you’ll be redirected back to the MonsterInsights setup wizard.
To complete the connection, select your Google Analytics 4 property from the dropdown menu and click the ‘Complete Connection’ button.
Next, MonsterInsights will connect Google Analytics with your WordPress website.
On the next screen, you’ll see some recommended settings like file download tracking and affiliate link tracking.
Next, you can scroll down and select who can see reports and add different WordPress user roles.
Once you are done, click the ‘Save and continue’ button.
After that, MonsterInsights will show different tracking features that you can enable for your website.
You can scroll down and click the ‘Skip for Now’ button.
Next, you’ll see a checklist showing that you’ve successfully connected Google Analytics to your website.
For example, it will show that you are successfully connected to Google Analytics, the tracking code is properly installed, and the data is being collected.
Next, you’ll need to scroll down and enter your license key.
For this tutorial, we will simply click the ‘Complete Setup without Upgrading’ option.
That’s it. You’ve added Google Analytics 4 property to your WordPress site.
You can learn more by following our guide on how to install Google Analytics in WordPress.
To see how your website is performing, simply go to Insights » Reports. Here, you’ll find all the data you need to make the right decisions to grow your website.
You can learn more about different reports by following our guide on how to add a stats dashboard in WordPress.
We hope this article helped you learn how to switch to Google Analytics 4 in WordPress. You may also want to see our ultimate WordPress SEO guide to improve your ranking or our comparison of the best email marketing services for small businesses.