How to get the new Google Analytics 4 Property (GA4) for WordPress?

by | Oct 19, 2020 | Google Analytics, WordPress | 18 comments

Google Analytics 4 – Google has recently (October 14, 2020) launched its next-generation Google Analytics, called Google Analytics 4 a.k.a. GA4. It was previously known as App + Web Property on the beta run.

GA4 will be the default experience for new Google Analytics accounts. Google will no longer be investing in the older version of GA, Universal Analytics.

In order to stay up-to-date with future improvements to GA, Google advises using the new Google Analytics 4 property alongside your existing Universal Analytics properties. Google is slowly rolling out a migration feature for the existing Universal Analytics (UA) properties. If the Upgrade to GA4 option is not available on your GA account, don’t be worried. Let us take you through how to create the new Google Analytics 4 property & implement on your website 🤝

Video Tutorial

Codechilli - codechilli blog google analytics 4 wordpress step 00

If you don’t have Upgrade to GA4 enabled on your Google Analytics Account, that’s perfectly fine. Keep reading, we will guide you on how to get the new GA4 property even without this option.

If you got Upgrade to GA4 option enabled on your account, see How to upgrade to new Google Analytics 4 (GA4) Property. Once you managed to upgrade, come back here & continue from Step 06

In this step-by-step guide, you’ll learn how to;

  1. Create a new Google Analytics 4 property
  2. Connect your existing Universal analytics Property with GA4 Property
  3. Install the tracking code on your website (replace the existing UA tracking code)
  4. Verify the new implementation is working properly by accessing the real-time report.

Create a new Google Analytics 4 property

Head over to the Google Analytics homepage & login with your Google account. If you’re a new Google Analytics user, you’ll be prompted to create an account & accept the end-user user agreement. Once the initial account set up is done, you may proceed to create the new Google Analytics 4 property.

Step 01

Click on Admin > Create Account or select an existing account you wish to set up your new property > Click on Create Property

Codechilli - codechilli blog google analytics 4 wordpress step 01

Step 02

Select Apps and Web & press Continue.

As we mentioned above, the new Google Analytics 4 & Apps and web properties are the same. Google will eventually rename this 🤞

Codechilli - codechilli blog google analytics 4 wordpress step 02

Step 03

Give a name to your new property & select appropriate options from the drop downs & click on Create

Codechilli - codechilli blog google analytics 4 wordpress step 03

Step 04

Now you’ll get below screen. If not, click on the admin > select your new property > Data Streams & select Web

Codechilli - codechilli blog google analytics 4 wordpress step 04

Step 05

Enter your website URL & give a name (i,e My WordPress website, etc).

Enhanced measurement would be enabled by default. We would recommend you to keep this enabled to get the maximum benefit from your new GA property. We will cover more about Enhanced measurements & its benefits in our future blogs.

Click on the gear icon to select the features you would like to enable.  Once done press Save & Create Stream

Codechilli - codechilli blog google analytics 4 wordpress step 05 01
Codechilli - codechilli blog google analytics 4 wordpress step 05 02

Connect your existing Universal Analytics Property to GA4

Step 06

Go back to your existing UA property by clicking on Admin > Select your UA Property from the drop down > Tracking Info > Tracking Code & Copy your Tracking ID

Codechilli - codechilli blog google analytics 4 wordpress step 07 new

Step 07

Switch back to your new GA4 Property by selecting the new GA4 Property from the drop down > Click on your Stream > Connected Site Tags

Codechilli - codechilli blog google analytics 4 wordpress step 07 new2

Step 08

Enter/paste the Tracking ID you copied from Step #06. Give a nickname & press Connect

Codechilli - codechilli blog google analytics 4 wordpress step 08new

Installing tracking code on your website

Step 09

Click on Add new on-page Tag > Select Global Tag (gtag.js) > Copy the tracking code. Now it’s time to place the code on your website.

Codechilli - codechilli blog google analytics 4 wordpress step 09

Step 10

We are using a WordPress site to demonstrate how to install the code. However, the approach is the same for any platform. Also, there are few methods you could use to implement Google Analytics on your WordPress site. Such as;

  1. Using Google Tag Manager
  2. Using a Google Analytics Plugin
  3. Using a plugin to insert the tracking code to your head section (here is a free plugin with 1 Million+ active installations)
  4. Your child theme’s header.php file etc. However, for simplicity purposes, we chose to utilize the Divi theme’s options panel for this blog post. However, it’s up to you to choose your preferred & feasible method to install the tracking code to the head section.

Important: If you already have the Universal Analytics Tracking Code installed on your website, you have to replace it with the new GA4 gtag.js code

Codechilli - codechilli blog google analytics 4 wordpress step 10

Note: For the simplicity purpose, we are not using any plugins or child themes & installing the tracking code on the theme’s built-in options panel. However, installing the tracking code directly to the theme is not a good approach. using a tag solution such as Google Tag Manager (GTM) would be a robust method to install Google analytics or any tracking pixels. If you need help implementing Google Tag Manager, feel free to contact us. 🙏

Once the above step is completed, open your website in a new browser tab.

Step 11

Now let’s head back to the Google Analytics UI. Choose your new Google Analytics 4 Property from the drop-down.

Codechilli - codechilli blog google analytics 4 wordpress step 11

Step 12

Go to Realtime from the left menu

Codechilli - codechilli blog google analytics 4 wordpress step 12

Let’s verify our implementation

Step 13

You’ll start seeing the real-time user count & the pages visited on both GA4 & the Universal Analytics Properties 😍

GA4 Real Time View

Codechilli - codechilli blog google analytics 4 wordpress step 13

Universal Analytics Real Time View

Codechilli - codechilli blog google analytics 4 wordpress real time

That’s all. You have successfully implemented Google’s next generation analytics property GA4 👏👏👏

If you’re facing any issues seeing the real-time data or stuck on any steps mentioned above, feel free to comment here or contact us. We would love to help you further. Cheers 🍻

References

18 Comments

  1. Amie Richards

    Wow, been searching for last couple of days… thanks for the detailed article.

    Reply
    • Codechilli

      Thanks for your comment, Amei. Feel free to contact us if you need further assistance. Cheers!!!

      Reply
  2. TL

    Hi, thanks for the easy steps, I just followed it, seems to be working ok!

    However, I notice Realtime visitors are not exactly the same in Universal GA (original setup) and new GA4 – it’s only been about 20 minutes but is this normal??

    For example, I see ‘Right Now: 13 users’ in UA, and only ‘USERS IN LAST 30 MINUTES:
    5’ in GA4. Thoughts?

    Appreciate your feedback!

    Reply
    • Codechilli

      Hi, thank you so much for your comment. Glad that you successfully set up GA4.
      Regarding the real-time user mismatch – as you rightly mentioned, it may take some time to flow data to the GA4 property. Also, since GA4 is new, Google is continuously working on improving this & adding new features to it.

      Reply
  3. TL

    Makes sense, thank-you!

    How did you setup event tracking in GA4? i.e. to track outbound links? I installed GMT code first for UA (which didn’t work), then removed it assuming GA4 does it automatically – but I don’t see any events, clicks.

    Do you know if I need to take additional steps here?? Thank-you.

    Reply
    • Codechilli

      Hi, thanks for your reply. It’s true that GA4 collects events automatically, but not every event tbh. Here’s the GA documentation contains the list of automatic events https://bit.ly/3mRGpRt. Please refer https://bit.ly/38drz3y to see the difference between UA & GA4 event collection. Also, I’ll write an article or do a video soon on this 🙂

      Wrt your GTM, I would strongly suggest you keep working on your GTM implementation. In case if you need any assistance do drop us a mail, glad to help 🙂

      Reply
  4. rene

    Good morning. Thank you for the clear and good description! I searched many internet sites but found no answers. You described it very well! It seems to be working fine for me now. I’m just a little confused about the tag manager naming, like: <script async src = "https: //www.googletagmanager.com/gtag/js? Id = G -….. etc. Why does the script refer to the task manager ????
    Thank you again for your help. I can advise everyone to follow your video and procedure !!!

    Reply
    • Codechilli

      Hi Rene, Good morning & thank you so much for your comment. Appreciated. Wrt to your query on script path: Google Tag Manager is the central repository of managing all the tracking codes/pixels. Google Analytics itself a tag. Hense the gtag js file is served from googletagmanager.com domain. Hope this clears your doubt. Feel free to let us know any further assistance required, would love to help 🙂 Thank you & have a great day!

      Reply
      • rene

        Good day, Thank you for your response. I appreciate that very much. Yes it is gradually becoming a bit clearer. Today I see good messages coming in on Google Analytics. So the migration went well. Thank you for your help and also for your offer to help me further. I really appreciate that! I wish you a nice day!

        Reply
        • Codechilli

          Hi Rene, glad to hear this. Thanks once again & you too have a nice day!

          Reply
  5. MMR

    Thanks a lot for this simplified guide! Really helpful!

    Reply
    • Codechilli

      Hi MMR, thank you so much for taking the time to write this comment. Appreciate it 🙂

      Reply
  6. Sashen Pasindu

    Well detailed! This really helps, thank you!

    Reply
    • Codechilli

      Hi Sashen, thank you so much for your comment 🙂

      Reply
  7. fordiy

    real time track user visit is work, but the ecommerce still not track. How to work it out?

    Reply
    • Codechilli

      Hi, thanks for your comment. Ecommerce tracking will not be enabled out of the box & you need to implement it separately. We’re providing e-commerce tracking as a service. If you are interested, please do contact us. Thank you.

      Reply
  8. Pedro

    Thanks for the explanation.
    I have followed all the steps like you described, but it does not work.
    My website is located on an intranet environment. Could this fact block the Analytics and prevent it from working properly?
    Or maybe should I wait for some hours to check it?

    Reply
    • Codechilli

      Hi, thanks for your comment. Please see if your Intranet site is allowed to talk to external servers. It should access Google Analytics JS libraries in order to send data to GA. You may check this on Chrome Developer Tool. Go to Network & type “collect” in the search bar & refresh the page. You’ll see analytics.js files. Click on those & see what’s status code are you getting. If it’s either 200 or 204, then the data is successfully sent to GA servers. Please do let us know the status code for further assistance. Thank you.

      Reply

Submit a Comment

Your email address will not be published.

What we do

We create brilliant digital products that help our clients get ahead and stay there.

codechilli-services-digital-marketing

Digital Marketing

We were born from digital and it remains our core capability of communication. We activate all of our studios (strategy, brand, data analytics, and technology) to work in harmony to deliver the right message to the right audience at the right time on the right platform.

codechilli-services-digital-analytics

Digital Analytics

Digital marketing thrives on data. No matter what type of site/app you have, whether it’s a large e-commerce site, a personal website, a site for a small business, or a high scale app people used to order food, it’s essential to understand how people interact with your web/app. We’re at your disposal.

codechilli-services-wordpress

Web Development

As your modern-day business card, your website is a digital biopsy of your essence. Through qualitative and quantitative research and analysis, we distill the essence of your brand and express it through user-centric design to create a bespoke digital experience.

Let's Talk

about your next project.

Share This