Are you trying to swap to the most recent Google Analytics model?
Google is now recommending web site homeowners to transfer to the brand new Google Analytics 4 as a result of they are going to be sunsetting the earlier Universal Analytics on July 1, 2023. After the sundown day, you gained’t give you the option to monitor information in the older model.
In this text, we’ll present you ways to simply swap to Google Analytics 4 in WordPress.
Why Switch to Google Analytics 4?
Google Analytics 4 (GA4) is the most recent model of Google Analytics. It helps you to monitor your cell apps and web sites in the identical account, and provides new metrics, experiences, and monitoring options.
If you haven’t created a GA4 property but, then now’s the most effective time to swap to the most recent model. That’s as a result of Google introduced that it will likely be closing down the previous Universal Analytics on July 1, 2023.
What this implies is that Universal Analytics will not obtain information out of your WordPress website, and it’ll ultimately cease working after the sundown date. That implies that all of your previous analytics information will probably be misplaced.
Switching to Google Analytics 4 as quickly as attainable will defend you from ranging from scratch with no historic information.
To do that proper, numerous good web site homeowners are utilizing the twin monitoring technique which permits you to proceed utilizing the present Universal Analytics whereas begin sending information to GA4.
This means, you possibly can future-proof your information whereas giving your self loads of time to be taught the brand new Google Analytics dashboard and options.
That being stated, let’s see how one can swap to Google Analytics 4 in WordPress with twin monitoring.
Creating a Google Analytics 4 Property
If you have already got an current Google Analytics account utilizing the previous model, then you possibly can eaily create a brand new GA4 property and begin sending stats to GA4.
First, you’ll want to go to the Google Analytics website and login to your account.
After that, head over to the ‘Admin’ settings web page in the underside left nook.
If you’re on basic Google analytics, you then’ll see the choice to setup GA4.
Go forward and click on on ‘GA4 Setup Assistant’ underneath the Property column.
In the following step, the setup assistant provides you with 2 choices. You can create a brand new Google Analytics 4 property or join an current one.
Since we’re organising a brand new property, merely click on the Get Started button underneath the ‘I need to create a brand new Google Analytics 4 property’ choice.
A popup will now seem with the small print concerning the setup wizard.
If you’ve applied your Universal Analytics utilizing the Global Site Tag (gtag.js) code, you then’ll see an choice to Enable information assortment utilizing current tags.
This makes use of the present monitoring code in your web site to gather info. That stated, in case you don’t have already got the precise monitoring code in your web site, we’ll present you ways to add it to your WordPress blog under.
For now, you possibly can go forward and click on the ‘Create property’ button.
The setup wizard will add a brand new GA4 property and duplicate the Universal Analytics property title, web site URL, timezone, and foreign money settings.
You can now view your new Google Analytics 4 property in the GA4 Setup Assistant.
Next, you’ll want to click on on the ‘See your GA4 property’ button to see your Google Analytics monitoring code.
After clicking on the button, merely click on on the ‘Tag set up’ choice to retrieve your monitoring code.
You ought to now see your new GA4 property underneath Data Streams.
Go forward and click on in your new property.
A brand new window will slide in from the precise, and also you’ll give you the option to see your internet stream particulars.
Note: Google Analytics 4 makes use of each ‘information stream’ and ‘internet stream’. These each merely imply the stream of analytics information that Google Analytics receives out of your web site.
Simply scroll down to Tagging Instructions part and click on the Global web site tag (gtag.js) choice to broaden the settings. You’ll now see your Google Analytics monitoring code that wants to be added to your WordPress web site.
One factor you want to know is that Google Analytics 4 experiences are fairly totally different than what you’re used to in Universal Analytics.
They have launched new terminology, and lots of acquainted metrics and experiences are lacking utterly. Basically in case you have been utilizing widespread experiences just like the Top Landing Pages report or others, you then’d have to recreate these from scratch in Google Analytics 4.
That’s why we suggest utilizing MonsterInsights Pro and even the free version of MonsterInsights.
It will show you how to see all of the acquainted analytics experiences proper in your WordPress dashboard, and it additionally helps you to use each Universal Analytics and Google Analytics 4 on the similar time.
Not to point out, with MonsterInsights you get all of the highly effective monitoring options comparable to outbound hyperlink monitoring, creator monitoring, and extra which may be enabled with out writing any code.
Let’s check out how to simply arrange Google Analytics 4 in your WordPress web site with MonsterInsights.
Adding Google Analytics Tracking Code to WordPress Site
The finest means to add Google Analytics monitoring code to your WordPress web site is by utilizing 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 web sites as a result of it helps you to simply setup superior monitoring with none coding abilities.
You can use the MonsterInsights Lite version to arrange Google Analytics in no time. There are additionally premium MonsterInsights plans that supply extra options like customized dashboard experiences, e mail summaries, scroll monitoring, eCommerce monitoring, premium integrations, and extra.
MonsterInsights additionally provides twin monitoring, that means you should utilize each Universal Analytics and Google Analytics 4 on the similar time. This is accessible in each the free model as effectively paid, and we extremely suggest utilizing this to be sure that your transition to GA4 goes easily.
First, you’ll want to set up and activate the MonsterInsights plugin. For extra particulars, please see our information on how to install a WordPress plugin.
Upon activation, you’ll be taken to the MonsterInsights welcome display in your WordPress dashboard. Simply click on the ‘Launch the Wizard’ button to add Google Analytics to your web site.
After clicking the button, the setup wizard will ask you to select a class that finest describes your web site.
You can select from a enterprise web site, writer (weblog), or online store. Once you’ve chosen a class, click on the ‘Save and Continue’ button.
In the following step, you’ll want to join MonsterInsights together with your WordPress web site.
Go forward and click on the ‘Connect MonsterInsights’ button.
Once you click on the button, you’ll want to signal in to your Google Account.
Simply choose your account and click on the ‘Next’ button.
Next, MonsterInsights would require entry to your Google Analytics Account.
MonsterInsights App wants these permissions, so it will possibly show you how to setup analytics correctly and present you all of the related stats proper inside your WordPress dashboard.
You can click on the ‘Allow’ button to proceed.
After that, you’ll be redirected again to the MonsterInsights setup wizard.
To full the connection, choose your Google Analytics 4 property from the dropdown menu and click on the ‘Complete Connection’ button.
Next, MonsterInsights will join Google Analytics together with your WordPress web site.
On the following display, you’ll see some beneficial settings like file obtain monitoring and affiliate link tracking.
You can use the default settings in the setup wizard. However, in case you’re utilizing an affiliate link plugin, you then’ll want to enter the trail you utilize to cloak the affiliate links.
Next, you possibly can scroll down and choose who can see experiences and add totally different WordPress user roles.
Once you’re performed, click on the ‘Save and proceed’ button.
After that, MonsterInsights will present totally different monitoring options that you may allow to your web site.
You can scroll down and click on the ‘Skip for Now’ button.
Next, you’ll see a guidelines displaying that you just’ve efficiently linked Google Analytics to your web site.
For instance, it is going to present that you just’re efficiently linked to Google Analytics, the monitoring code is correctly put in, and the info is being collected.
That’s it, you’ve added Google Analytics 4 property to your WordPress web site.
Creating a Measurement Protocol API Secret
If you need to MonsterInsights to monitor eCommerce purchases, form conversions, and extra superior monitoring in Google Analytics, you then’ll want to create a Measurement Protocol API Secret.
First, you’ll want to return to your Google Analytics account after which go to Admin settings. Next, click on on the ‘Data Streams’ choice underneath Property column.
Then you’ll want to choose the Google Analytics 4 property that we created earlier.
Go forward and choose your property underneath Data Streams.
After that, you possibly can scroll down to the ‘Advanced Settings’ part.
Simply click on the ‘Measurement Protocol API secrets and techniques’ choice.
A brand new window will now slide in together with your Measurement Protocol API secrets and techniques.
You may have to click on the ‘Create’ button.
After that, enter a nickname to your API secret so it’s simply identifiable.
When you’re performed, click on the ‘Create’ button.
You ought to now see your Measurement Protocol API secret.
Simply copy the API secret underneath the ‘Secret worth’ area.
After that, you possibly can head again to your WordPress web site and navigate to Insights » Settings out of your dashboard.
Now click on on the ‘General’ tab on the high.
Next, you’ll have to scroll down to the ‘Google Authentication’ part.
Go forward and enter the Secret worth you simply copied in the Measurement Protocol API Secret area.
You’ve efficiently added Measurement Protocol API Secret in MonsterInsights.
Setting Up Universal Analytics Dual Tracking
Now that you’ve setup GA4, the following step is to allow twin monitoring for Universal Analytics, so it will possibly run alongside your Google Analytics 4 property in WordPress.
With MonsterInsights, you possibly can simply arrange twin monitoring and concurrently monitor each properties with out writing code.
Note: If you have already got Universal Analytics monitoring code added to your WordPress web site, then we suggest disabling it first. Otherwise, it may lead to double-tracking and might skew your information.
To begin organising twin monitoring correctly, you possibly can head to Insights » Settings out of your WordPress admin panel after which click on on the ‘General’ tab.
Next, you’ll want to scroll down to the ‘Google Authentication’ part.
Now underneath the Dual Tracking Profile, enter your Universal Analytics (UA) code.
You can simply discover your UA code in Google Analytics Admin settings.
Simply go to the Admin settings web page in Google Analytics of your Universal Analytics property.
Then click on on ‘Property Settings’ underneath the Property column.
You ought to see the Tracking Id, and it’ll seem like this: UA-123856789-5
You’ve now efficiently arrange twin monitoring in your WordPress web site.
To see how your web site is performing, merely go to Insights » Reports. Here you’ll discover all the info you want to make the precise choices to develop your web site.
We hope this text helped you learn the way to swap to Google Analytics 4 in WordPress. You may additionally need to see our ultimate WordPress SEO guide to enhance your rankings, or see our comparison of the best email marketing services for small enterprise.
If you favored this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You may also discover us on Twitter and Facebook.
The put up How to Switch to Google Analytics 4 in WordPress (The RIGHT Way) first appeared on WPBeginner.