Google announced in April 2022 that it would be retire Universal Analytics (the previous version of Google Analytics) and encouraged all users to move to Google Analytics 4 (GA4) as soon as possible. This article explains how to setup GA4 tracking for your site, and optionally install it alongside your existing Universal Analytics.
Create a GA4 Property
Google Analytics is structured into Account / Property / View. You may have multiple Properties under each Account, and multiple Views under each Property. To use GA4, you need a new Property.
Note: You can also have multiple Accounts. Make sure you are in the correct Account before proceeding.
Navigate to the account Admin by clicking the gear icon in the bottom left of the screen.
In the Property column, you should see a GA4 Setup Assistant link. If you don’t, you may already be using GA4. Click on the link.
Under I want to create a new Google Analytics 4 property, click Get Started.
A modal window will appear to confirm your action. We suggest leaving the checkbox for Enable data collection using your existing tags selected. Click Create property to continue.
You’ll now see the success screen above with the Connected badge. Click the button or use the select field in the Property column to navigate to the property.
You have now created a new GA4 property. If you had selected the checkbox for Enable data collection using your existing tags, the new GA4 property should also automatically begin collecting data from your website.
GA4 properties don’t have views. Just return to the Reports dashboard to see your stats.
Verify that your GA4 property is receiving data by navigating back to the Reports section of Google Analytics, then clicking into the Realtime report. If GA4 is receiving data correctly, you will see visitors currently browsing your site like in the screenshot below. You may need to visit your own site and wait up to 5 minutes for the report to update.
Install Google Analytics 4 alongside Universal Analytics
We strongly recommend using both Google Analytics 4 and the older Universal Analytics at the same time while it is still possible to do so. This will ensure continuity in your analytics data (in Universal Analytics) while you get familiarized with Google Analytics 4.
The best way to install Google Analytics 4 on your WordPress website is with a plugin. Here are the recommended plugins to install both Google Analytics 4 and Universal Analytics in WordPress.
Google Site Kit
Google Site Kit is Google’s official plugin for connecting WordPress to its services like Analytics, Search Console and more. Learn how to add Google Analytics 4 to your site with Google Site Kit.
Google Analytics for WordPress by MonsterInsights is a popular plugin for integrating Google Analytics with WordPress. It has a Dual Tracking function to install both versions of Google Analytics. Learn how to setup MonsterInsight’s Dual Tracking.
The Pro version of PixelYourSite allows you to add multiple Google Analytics tracking IDs. Simply locate the measurement ID of your GA4 property, then enter it into the PixelYourSite settings. The plugin will automatically detect the version and output the correct tracking code.