Setting Up Google Analytics in WordPress​​​​​​​

All standard Universal Analytics properties will stop processing new hits on July 1, 2023.

If you currently use Universal Analytics properties for your website, set up a GA4 property alongside it to take advantage of new Analytics features as they come out.

Google Analytics 4

The new way Analytics collects and stores data enables many of the benefits of the latest Google Analytics experience. Rather than using a session-based model, which groups user interactions within a given time frame, it uses an event-based model, which processes each user interaction as a standalone event.

In GA4 properties, you can still see session data, but Analytics collects and stores user interactions with your website or app as events. Events provide insight on what's happening in your website or app, such as pageviews, button clicks, user actions, or system events.

Events can collect and send pieces of information that more fully specify the action the user took or add further context to the event or user. This information could include things like the value of purchase, the title of the page a user visited, or the geographic location of the user.

How to Set Up a GA4 Google Analytics Property

Step 1 — Open your Google Analytics account

Go to to create a new Analytics account, or sign in to your existing account and go to your account settings.

Step 2 — Create a GA4 property

Enter your website's information for your new property. New properties created in Analytics are GA4 properties by default.

Step 3 — Create a data stream for your website

Choose the platform for your data stream — web — and enter the information for your website.

When you’re creating a web data stream, you’ll see an option called enhanced measurement. Keep this on to automatically collect pageviews, scrolling, outbound link clicks, site searches, and other common user events. You can disable or re-enable enhanced measurement at any time.

Step 4 — Enable data collection

In Google Analytics, navigate to the Admin panel (click the gear in the left column). Choose Data Streams under your property.

Click on the web stream for your site.

In the stream details, you will find your Measurement IDCopy your Measurement ID by clicking the icon next to it.

In the WordPress Dashboard, under Statistics + GTM, select Google Analytics and paste your Measurement ID into the Analytics 4 box. Click Save Changes.

This will allow you to track the specific property with Google Analytics but will not allow you to view Google Analytics in your WordPress Dashboard. Analytics in the WordPress dashboard is currently only available for Universal Analytics. This article will be updated when it is available for GA4.

Verify the setup of your Google Analytics 4 property

Now that you've completed the steps to set up your account with a GA4 property, it's time to check that you’ve configured it successfully. Log into your Google Analytics account and open your new GA4 property to verify that data has started reporting. You will be able to see page views in real time.



Article ID: 930
Wed 6/8/22 4:59 PM
Tue 6/28/22 12:11 PM