In this GA4 tutorial, we’re going to help you prepare for the switch. We’ll go through the process of setting up Google Analytics 4 for new and existing websites, as well as how to install the tracking tag on your WordPress, Wix, Webflow, and Squarespace projects.
Google Analytics is the long-reigning champ when it comes to tracking and analyzing visitor activity on websites. It was recently given an upgrade to Google Analytics 4 and all users will be required to make the switch by July 2023.
If you’re curious, you can read all about why Google is moving to GA4 here.:
Google Analytics setup will differ depending on if you have an existing account as well as the CMS you use:
How to Set Up Google Analytics 4 for New Websites
1. Create an Account and Sign in
If this is your first time creating a GA4 account (not a property, but an account), go to the Google Analytics website. Create an account with your existing Gmail address.
After signing in, you’ll be taken to the Google Analytics platform where you’ll be able to set up your new property.
2. Create Your Properties
Properties in GA4 refer to the websites and apps you’re tracking. If you have multiple digital products for the same brand, create a separate property for each.
Give the property a name and update the geo-related details. Then click the Next button.
3. Enter Business Details
Next, tell Google a bit more about your business:
- Choose your industry.
- Pick your business size.
- Select the different ways you plan to use GA4.
Click the Create button when you’re done.
4. Enter Website or App Details
Google will then ask which platform to track data from: Web, Android app, or iOS app.
In the next screen, enter your Website URL and give the data stream a unique name. This will make it easier to identify multiple properties from your account.
Keep the enhanced measurement settings as they are. Then click Create stream.
This will finish the setup in Google Analytics of your new website. However, you now need to connect it to your digital product.
How to Switch to Google Analytics 4 from Universal Analytics
If you already have a Universal Analytics account, GA4 setup can be done in a few clicks.
Log into your account and open your UA property. You should see a notification at the top of the page that reads:
“On July 1, 2023, this property will stop processing data. Starting in March 2023, for continued website measurement, migrate your original property settings to a Google Analytics 4 (GA4) property, or they'll be copied for you to an existing GA4 property, reusing existing site tags.”
Click the Manage GA4 migration button to the right of it.
If you don’t see the notification, you’ll find the migration area by going to Admin > Property > GA4 Setup Assistant.
Click the Get Started button. Google will handle the migration of your data stream from UA to GA4.
Once your UA website has migrated to GA4, you’ll see a page similar to what the screenshot reflects above.
The last thing to do is replace the Universal Analytics tag on your website with your new GA4 tag. You’ll find instructions on how to do that in the next section.
How to Install the Google Tracking Tag on Your Site
With your analytics account setup, you now need to install the Google tag on your site so GA4 can start tracking activity there.
The process differs depending on which website builder or CMS you use. I’ve included some basic installation instructions for the most common CMS here:
Connect Google Analytics to WordPress
After you finish setting up your new property in GA4, Google will try to detect which CMS you’re using. In the case of my new website, it’s detected WordPress.
Google has given me two WordPress plugin options to choose from: MonsterInsights and Site Kit by Google.
Before you choose one of these plugins, I’d suggest checking your page builder plugin and WordPress theme first. Some of them include direct GA4 integrations in the settings panels or, at the very least, ways to add the code without having to worry about plugin/theme updates erasing it. If you can spare yourself the hassle of installing a new plugin, go that route.
Using a WordPress Plugin
Install your Google Analytics plugin in WordPress. After connecting your WordPress site to Google, you’ll be asked to select your Google Analytics property.
Here’s how that looks in MonsterInsights:
Site Kit will take you through a similar process of logging in with your Gmail and then choosing the property to connect.
Complete the connection process to set up your Google tag.
Using Your Website Builder or Theme
Some WordPress themes have an area in their settings where they’ll ask you to enter your G- identification number or the full tag. BeTheme, for instance, has an SEO area under theme options where you can add the tag.
Page builder plugins may also include this feature. Elementor Pro, for instance, has a Custom Code area where you can add your GA4 tag to the <head>.
Save your changes when you’re done.
Connect Google Analytics to Wix
If Google doesn’t automatically detect Wix as your website builder, click the Choose another option. This will open a panel where you can select Wix.
Go to your Wix website. Open up the Settings > Marketing Integrations panel from the top toolbar. Then click Connect under Google Analytics.
So long as you’re on a Premium plan you’ll be able to add the Google Analytics ID to this screen. That’s the G- number, not the full tag.
Save your changes when you’re done.
Connect Google Analytics to Webflow
Go to your Webflow website. Open up the Project Settings from the Webflow icon in the top-left corner. Click on the Integrations tab and you’ll find Google Analytics there.
Enter your G- identification number into the field. Then save your changes.
Connect Google Analytics to Squarespace
If Google doesn’t automatically detect Squarespace as your website builder, click the Choose another option. This will open a panel where you can select Squarespace.
Go to your Squarespace website. Navigate through Settings and Advanced to get to External API Keys. You’ll find a field here to enter your G- ID.
Save your changes and exit the panel.
Connect Google Analytics to Other CMS
Even if your website builder isn’t listed in the Google Analytics list of CMS integrations, you should be able to add the tracking tag to the header of your site.
To grab that tracking tag, switch the tab to Install manually so you can copy it.
Then go into your CMS’s code editor (or theme editor). Add the tracking code just below the
<head> and save your changes.
When you’re done installing the Google tag, give it up to 48 hours to start pulling in data.
To confirm that your tag is working, visit the Admin area in Google Analytics. Go to Property and Data Streams.
You will see a list of all your properties under that account. If the tag is working, it will say:
“Receiving traffic in past 48 hours.”
If it still isn’t working, go to Property and Setup Assistant to review the Data Collection instructions and change the installation method if needed.
Once everything is set up and ready to go, you can start working on reviewing your data, customizing your dashboard, and analyzing and optimizing the user journey. You’ll find tips on how to do that in the next GA4 tutorial.