Have you installed Google Analytics 4 (GA4) on your website yet?
If not. Add it to the top of your ToDo list.
Google has announced that on July 1, 2023 Universal Analytics (UA) will go away and will be replaced by Google Analytics 4 (GA4). We strongly suggest that you run GA4 in parallel with UA.If you don’t know where to start, we will give you step-by-step instructions for installing GA4 for WordPress, Squarespace and Shopify. Before you install GA4 on any platform, you will need to create a GA4 property in your GA Account.
How to Create Google Analytics 4 (GA4) property in your Google Analytics account:
- Log in to your Google Analytics account at analytics.google.com
- Click on the Admin button in the bottom left corner of the screen.
- In the middle column, under Property, click on the + Create Property button.
- Select the Web option and then click Next.
- Enter the name of your website, the website’s URL, and the industry category that best describes your website.
- Select the data-sharing settings that you prefer and then click Next.
- Review the terms of service and privacy policy and then click Create.
- Your GA4 property will now be created and you will be taken to the tracking code page, where you can find your GA4 tracking code.
- You can now copy the GA4 tracking code and install it on your website as described in the previous answer.
Note: If you already have an existing GA property, you will see the option to upgrade to GA4.
Step-by-Step Instructions for installing GA4 on WordPress
- Create a GA4 property in your Google Analytics account.
- Copy the GA4 tracking code from your Google Analytics account.
- Log in to your WordPress website and go to the Plugins section.
- Search for the plugin “Google Analytics for WordPress by MonsterInsights” and install it.
- Activate the plugin and go to the Insights settings page.
- Click on the “Authenticate with your Google account” button and log in to your Google account.
- Select the GA4 property you want to connect to your WordPress website and then save the changes.
- Verify that the tracking code is installed correctly by checking the Real-Time report in your GA4 property
Note: If you don’t want to use a plugin, you can add GA4 tracking code to the header.php file of your WordPress theme, which can be done by editing the file through the Appearance > Editor section in the WordPress admin panel.
Step-by-Step Instructions for installing GA4 on Squarespace
- Create a GA4 property in your Google Analytics account.
- Copy the GA4 tracking code from your Google Analytics account.
- Log in to your Squarespace account and go to the website’s Settings.
- Select Advanced from the left-hand menu and then select Code Injection.
- Paste the GA4 tracking code into the Header Code Injection section and click Save.
- Verify that the tracking code is installed correctly by checking the Real-Time report in your GA4 property.
Note: If you are using Squarespace version 7.1 or later, you can install GA4 via the built-in analytics feature, no need to use code injection.
Note: If you are using Squarespace version 7.0 or lower, you can use Google Tag Manager (GTM) to install GA4.
Step-by-Step Instructions for installing GA4 on Shopify
- Create a GA4 property in your Google Analytics account.
- Copy the GA4 tracking code from your Google Analytics account.
- Log in to your Shopify account and go to the Online Store section.
- Select Themes and then click on the Actions button and select Edit Code
- In the Templates folder, open the theme.liquid file
- Paste the GA4 tracking code just before the </head> tag, then click Save.
- Verify that the tracking code is installed correctly by checking the Real-Time report in your GA4 property
Note: If you want to use Google Tag Manager (GTM) to install GA4 on your Shopify store, you can add the GTM container code to your theme.liquid file, and then add GA4 tracking code in GTM.
Okay. PHEW. Once you have installed GA4 on your site, how do you know if it is working? What is the best way to verify that it is working properly.
To test if your Google Analytics 4 (GA4) set up is working correctly, try this:
- Check the Real-Time report in your GA4 property: Once you have installed the GA4 tracking code on your website, you can check the Real-Time report in your GA4 property to see if data is being collected from your website.
- Use the GA4 Debugging Extension: The GA4 Debugging Extension is a browser extension that allows you to see the data being sent to GA4 from your website in real-time. This can be useful for troubleshooting any issues you may be experiencing with your GA4 set up.
- Use GA4 Measurement Debugger: The GA4 Measurement Debugger is a browser extension that allows you to see the data sent to GA4 by the tracking code on your website in real-time, and will also give you detailed information about any issues that may be preventing data from being sent to GA4.
- Use the GA4 Event Tagging: In GA4, you can use event tagging to track specific actions on your website, such as button clicks, form submissions, etc. You can use the GA4 Event Tagging to test if the events you have set up are firing correctly.
- Check the GA4 Event in the GA4 Debug View: Once the events are firing correctly, you can check the GA4 Debug View to see if the events are being received by GA4 correctly.