How to Swap WordPress to Google Analytics 4

How to Swap WordPress to Google Analytics 4
Comments Off on How to Swap WordPress to Google Analytics 4, 12/07/2022, by , in Wordpress

Looking for the simplest way to established up Google Analytics 4 on WordPress? 😎

Google will discontinue the more mature variation of Google Analytics on July 1, 2023, so it is vital to make the swap shortly if you want to establish up historic facts in your new Google Analytics 4 home.

Fortunately, the method is pretty uncomplicated. After you make the shift, you can also start off using the updated applications and options in Google Analytics (GA).

In this put up, we’ll choose a nearer seem 🔎 at the new Google Analytics features. Then, we’ll present you how to change to Google Analytics 4 in WordPress. Let’s get begun!

An overview of Google Analytics 4

Google Analytics 4 is a new house which is created to offer additional accurate reports for businesses while shielding person privateness. Even though Google Analytics 4 has been readily available for a though by now, it will soon totally change Common Analytics (UA).

Google has not long ago announced that UA will stop collecting facts in 2023. Thus, now is the appropriate time to make the change to Google Analytics 4 and familiarize on your own with this new interface:

The Google Analytics 4 interface

Google Analytics collects equally website and software knowledge. It also organizes studies close to the purchaser existence cycle. For instance, you can see which sources are driving targeted traffic to your internet pages, the steps taken by customers, and regardless of whether they keep on being on your web site soon after making a buy or participating with your articles:

The Customer Life Cycle in GA4

As you may by now know, the electronic marketing and advertising planet is relocating to a cookieless foreseeable future. Because of to the expanding desire for on the net privacy, lookup engines like Google are phasing out third-occasion cookies and inserting far more emphasis on very first-bash knowledge.

Google Analytics 4 presents granular data controls to assistance web site house owners comply with GDPR polices. For illustration, the new consent method permits you to regulate the actions of your Google tags based mostly on a user’s privacy choices.

It’s also value noting that GA4 uses functions instead of session-primarily based details. Each individual of them has a exclusive title that describes a consumer motion:

events in action

These gatherings may incorporate webpage sights, transactions, downloads, and a lot more. You can then simply click on an function to accessibility extra facts about it. For instance, if you go to site_perspective, you can assess person engagement on personal internet pages, see the event count by region, and more.

In addition, GA4 arrives with AI-driven insights that can assist you plan your marketing strategies extra efficiently. Analytics Intelligence can predict tendencies and outcomes for your site, like conversions and gross sales. You can use these insights to improve your internet marketing system and attain the right viewers.

How to swap to Google Analytics 4 on your WordPress website (in 3 actions)

Now, let’s look at how to swap 🔀 to Google Analytics 4 in WordPress.

Action 1: Produce a new Google Analytics 4 property

The initial phase is to produce a new Google Analytics 4 Property if you haven’t done so previously.

⚠️ Observe – if you established up your Google Analytics home within the earlier year or so, you may well have already created a GA4 assets together with your Common Analytics house simply because Google was heavily pushing this method in the interface. In that case, you can skip to the following step.

To get commenced, log into your Google Analytics account and click on ADMIN on the base left-hand aspect of your display screen.

In the Account column, make confident to pick the accurate GA account. Then, in the Residence area, decide on your present Universal Analytics residence. After that, click on on the GA4 Setup Assistant choice:

GA4 Setup Assistant option

In the I want to produce a new Google Analytics 4 property box, click on Get commenced. This will start a popup window.

If you’ve additional Universal Analytics to your web site working with the world web page tag (gtag.js) code, you will see an option to Help facts collection using present tags. If you select this, GA will use the existing tracking code on your website to accumulate knowledge, so you will not have to have to re-insert it.

Nevertheless, you really do not will need to fret if you don’t have the GA monitoring code on your site but. We’ll display you how to increase it in the future move.

Either way, future you will need to select Make Residence. The moment the method is finish, you will see the adhering to concept:

The GA4 Property connection message

You can now click on on the Go to your GA4 property button to accessibility the Setup Assistant:

The GA4 Setup Assistant

In this article, you will uncover some options for your new home. If you by now have the GA monitoring code on your web page, you really do not need to do anything at all else – you are finished. If not, you can transfer on to the future step.

Stage 2: Get your GA4 tracking code

Up coming, you will require to entry your tracking code for GA4. In your Set up Assistant, navigate to the Selection part and simply click on Tag installation:

Tag installation option in GA4

Below Knowledge Streams, you need to see your new GA4 property:

Data Streams in GA4

If you click on on it, you will get a window with some information about your stream:

Web Stream Details

Now, scroll down to Tagging instructions and pick the International website tag (gtag.js) option. You are going to then see your Google Analytics tracking code:

The GA4 tracking code

Go in advance and duplicate the code. The future stage is to insert it to your website.

Phase 3: Include the monitoring code to your web-site

At last, you will want to hook up your WordPress website with your new Google Analytics 4 assets. There are two main means to do this, both of those are built simple many thanks to plugins. You can possibly add your GA tracking code in your header or footer or insert your measurement ID making use of a committed Google Analytics plugin. Let’s take a close glance at just about every technique.

Strategy 1: Insert the tracking code in your header or footer

You can start off utilizing GA4 on your web-site by including the monitoring code to your header or footer.

While you can do this manually making use of a youngster concept, a more simple option is to use a plugin, these types of as Head, Footer and Publish Injections.

This is a useful tool mainly because it enables you to incorporate code to your footer and header without having to contact your little one theme’s data files. This way, if you change to a distinctive concept in the upcoming, you won’t eliminate these configurations.

To get begun, you’ll want to go to your WordPress dashboard and put in and activate the plugin on your internet site. Then, go to Options > Header and Footer and navigate to the Head and Footer tab:

Inserting your tracking code into your header to get Google Analytics for in WordPress

Now, you can paste your GA tracking code (from the previous step) into the Web site Area INJECTION place. You will have to have to insert this in the discipline for ON Each and every Website page.

Continue to keep in head, Google endorses that you include the GA monitoring code to the header of your web page. This allows it to observe your targeted traffic and person behavior more accurately, as header scripts tend to load ahead of the rest of your website page.

Nevertheless, you can also include the code to your footer. To do this, basically scroll down to Right before THE CLOSING TAG (FOOTER) and paste your code into the pertinent field. Observe that this technique could not give you accurate insights into your visitors’ actions.

Strategy 2: Use the free GA Google Analytics plugin

You can also enable GA4 on your site by utilizing the free GA Google Analytics plugin.

At the time you’ve mounted the no cost plugin from, navigate to Options > Google Analytics in your WordPress dashboard and click on on Plugin Settings:

The GA Google Analytics settings

In the GA Monitoring ID industry, you will require to enter the measurement ID for your new Google Analytics 4 house. You can uncover this on the World wide web stream aspects webpage revealed previously mentioned in step two.

For Monitoring Approach, find International Website Tag. Then, simply click on Conserve Alterations, and you’re completed. Take note that it may possibly choose up to 48 hours to start off observing data in your Google Analytics account.

Increase Google Analytics 4 to WordPress nowadays

Google Analytics 4 comes with several helpful attributes for marketers and web-site house owners. It permits you to track the purchaser everyday living cycle, offers you information and data on significant occasions, and aids you adhere to on the net privateness guidelines.

More importantly, Google will halt processing new info for Universal Analytics on July 1, 2023, so you will require to make the switch no matter of how you come to feel about the new functions.

In this submit, we seemed at how to make the changeover to Google Analytics 4 in WordPress. Here are the three methods you can abide by:

Develop a new Google Analytics 4 home in your GA account.Get your GA4 tracking code.Add the monitoring code or measurement ID to your website, making use of Head, Footer and Article Injections or the GA Google Analytics plugin.

If you are continue to new to Google Analytics, you can also check out our information to the Google Analytics interface to discover 👨‍🎓 how it operates. We also have much more highly developed 🚀 posts on how to segment your analytics or set up tailor made Website positioning dashboards to keep track of your initiatives.

Do you have any issues about switching to Google Analytics 4 in WordPress? Enable us know in the comments part beneath!

Absolutely free information
5 Crucial Tips to Velocity Up Your WordPress Internet site
Decrease your loading time by even 50-80% just by pursuing uncomplicated guidelines.

About Vikram Rout

Vikram Rout has been a blogger, digital marketer and an SEO expert at, one of the fastest growing custom design crowdsourcing platforms. Over the years, he has been helping small businesses and startups improve website design and SEO strategy, content marketing and user experience. You can engage with him on here.