Want to add Google Analytics 4 (GA4) to WordPress? You’re in the right place!
In this step-by-step guide, we’ll go over how to add the newest version of Google Analytics, GA4, to WordPress using the best plugin for the job: ExactMetrics.
ExactMetrics is the best plugin to use to add Google Analytics 4 to WordPress because it’s one of the only plugins that allows you to connect both your Universal Analytics and GA4 properties to your WordPress site at the same time.
Ready to get started? Let’s go!
Add GA4 to WordPress in 4 Steps
- Create a Google Analytics 4 Property
- Install and Set Up ExactMetrics
- Set Up Dual Tracking
- Turn Off Enhanced Measurement
Step 1: Create a Google Analytics 4 Property
If you don’t have a GA4 property set up yet, you’ll need to do that first. The instructions for this are different if you already have an Analytics account vs if you need to create one. Let’s take a look at the process for each.
Directions for if you already have a Universal Analytics property
Directions for if you do not have a Google Analytics property set up yet
If you already have a Universal Analytics property…
If you already have a Google Analytics account and a Universal Analytics property, you can go through the process of creating a GA4 property pretty easily by following Google’s Setup Assistant.
To access the assistant, head to the Admin cog then GA4 Setup Assistant in the middle column.
Next, click the blue Get Started button.
Then, click the Create Property button. The last option will either be checked or not based on which version of the tracking tag you currently have installed.
Your new property is created! Go ahead and click See Your GA4 Property.
Alright, let’s leave that tab open now and go to the next step.
If you do not have a Google Analytics property set up yet…
If you don’t have Google Analytics yet, follow these steps to set up your account and create both GA4 and Universal Analytics properties at the same time.
The first thing you’ll need to do is log in or sign up for a Google account.
To get started, you’ll need to open the Google Analytics website and click the Sign in to Analytics link or Start for free button in the top right corner of the page.
Next, you can log in to your existing Google account if you have one, or click the Create account link to create a new Google account.
Now, click the blue Start Measuring button.
Next, you’ll need to enter the Account name for your Google Analytics account. You’ll also see different data sharing settings. Make sure you check all the boxes and then click Next.
Now, you’ll have to enter the property details of your website. Start by entering a name, selecting a reporting time zone, and choosing your currency.
Fill in your business details and click Create. You may see a popup at this point to accept the Google Analytics Terms of Service. Go ahead and check the checkbox and click I Accept.
Now, a popup window should now appear that contains Google Analytics Terms of Service Agreement.
Review the terms of service and then check the box below the terms about GDPR.
On the next screen, you’ll be offered a guided tour. Go ahead and go through it if you want a guided tour of your account.
Don’t set up your data stream when prompted – ExactMetrics will do this part for you.
Step 2: Install and Set Up ExactMetrics
Already have the plugin? Skip to step 3.
To start, head to the Pricing page and get started with ExactMetrics. Once you complete checkout, download the plugin.
Next, upload it to your website.
Now that you have ExactMetrics installed, you can add your license key and connect your Google Analytics account. To get set up, click on ExactMetrics under your WordPress Dashboard and click the big green “Launch the wizard!” button.
Once you’re in the wizard, you’ll get to this page where you can add your license key and connect with Google Analytics:
For more details on this step, check out our guide on How to Add Google Analytics to Your WordPress Site.
Step 3: Set Up Dual Tracking
Here’s how to add your GA4 property to the Dual Tracking box in ExactMetrics.
A GA4 property has a Measurement ID, which is in the format of G-XXXXXXXXXX.
To find your Measurement ID, go to Admin » Property » Data Streams and then click into the data stream:
You’ve located your Measurement ID and now you can add it to ExactMetrics.
First, log into your WordPress site and go to ExactMetrics » Settings.
Under the Google Authentication section, you’ll see a Dual Tracking Profile option.
Copy your Measurement ID and then paste it into the option.
Once you insert the ID, the settings will be saved.
That’s it! You’re now dual tracking both a GA4 and UA property on your WordPress site.
Step 4: Turn Off Enhanced Measurement
Now, for ExactMetrics to work properly, you’ll want to make sure you have Enhanced Measurement toggled to Off. To do that, go back to GA4 and open your data stream:
Now, turn Enhanced Measurement OFF. ExactMetrics tracks those events for you. Leaving tracking turned on in Google Analytics could disrupt your tracking through ExactMetrics.
Your WordPress website is now connected to both GA4 and Universal Analytics. Because you used ExactMetrics and connected both properties, you’ll have the best of both worlds with your tracking.
Now, are you wondering what to track? Read 8 Types of Google Analytics Reports to Track (The Best Ones).
Don’t forget to follow us on Twitter and Facebook to see all the latest Google Analytics tutorials.