How to Upgrade to Google Analytics 4
July 29, 2021
Google Analytics 4 launched in October 2020, and offers a whole host of new and innovative features.
Whilst getting started with the newest version of Google Analytics is pretty straightforward, it’s important to get it right to ensure your data is being tracked correctly to avoid any gaps.
Bear in mind that you’ll need to run GA4 alongside your existing Universal Analytics property to avoid losing all of your historical data, as it will only start tracking from setup onwards. Your UA reports will remain the same even after you’ve upgraded, as GA4 runs as a separate property, so you can view these any time you want.
How to upgrade to GA4: Google Tag Manager
Step 1: Check that you have Universal Analytics
Log in to your Google Analytics account and enter the admin area. If you’re using UA, there will be three columns – ‘Account’, ‘Property’ and ‘View’. If you’re already using GA4, you should only see two columns. If you see the latter, then you don’t need to upgrade. If you’re definitely using UA, then keep reading to find out what to do next.
Step 2: Get set up
If your site uses the gtag.js, you’ll have the option to enable data collection using your existing tags. If you use a website builder (such as WordPress, Wix or Shopify), Google Tag Manager or your website is tagged with analytics.js, the setup wizard cannot reuse your existing tagging and you’ll need to add it yourself. Read on to find out how.
Head to the ‘Property’ column. Here is where you’ll find something called the ‘GA4 Setup Assistant’ (near the top). Click on this and you’ll be given two options – create a new GA4 property or connect with an existing one. Select the ‘Get Started’ button under the first option. You’ll be given some important information at this point – make sure you read it carefully before proceeding.
Click ‘Create New Property’ to proceed. The new GA4 property will then be created so you’ll need to add the new tag to your website.
Step 3: Add the GA4 tag
Under ‘Collection’, go to ‘Tag Installation’. You will now see the data stream that has been automatically created. The data stream is the equivalent of the tracking codes that you will have been given for your UA properties.
Select the data stream to open the ‘Web Stream Details’ window. In the top right corner you’ll find the Measurement ID (the equivalent of a tracking ID). Copy this ID then open Google Tag Manager and create a new tag for the GA4 property (Overview > Add a new tag). You can name this anything you like, but something simple like GA4 will make it easier to identify.
Next, you will need to select ‘Tag Configuration’ then choose ‘Google Analytics: GA4 Configuration’ as the tag type. Simply paste the Measurement ID you copied earlier into the new GA4 tag configuration.
Step 4: Add triggers
A trigger controls when your GA4 tag will fire. Select ‘Triggering’ then ‘All Pages’ to add the GA4 tag to every page on your website. Click the ‘Save’ button.
Step 5: Preview the tags
Select the ‘Preview’ button in the top right corner of the window to check that your tag is firing correctly on your website. Enter your URL then hit ‘Connect’. The preview page will contain a window in the corner of the screen which will tell you whether the Tag Assistant has connected or not.
Step 6: Publish tags
Once you’ve confirmed that your tags are firing correctly, you can return to Google Tag Manager and press ‘Submit’ to publish your changes.
Setting up Google Analytics 4 on Shopify
The way you approach upgrading to GA4 with Shopify will depend on which version of the ecommerce platform you’re using. If you’re using Shopify Plus, you can install the tracking code, or Google Tag Manager, on all pages of your Shopify store, including checkout pages.
If you’re using the standard version of Shopify, you won’t be able to install GA4 on your checkout page. If you’re on a standard Shopify plan, follow the below steps to get Google Analytics 4 set up.
Step 1: Add the tracking code to your theme
In your Shopify dashboard, head to ‘Online Store’ then ‘Themes’. Edit the theme.liquid file and paste the tracking code between the head tags. You will need to replace the previous Google Analytics code beginning with G- with the Measurement ID from your GA4 data stream.
Step 2: Add the tracking code to your order confirmation page
To do this, you’ll need to click on ‘Settings’ then ‘Checkout’. Then add a modified tracking code to the ‘Additional Scripts’ section under ‘Order Processing’. Again, you will need to replace the existing GA code.
Step 3: Exclude Shopify as a referral in GA4
You’ll need to prevent Shopify checkout pages from showing up as referrals in your reports to ensure that all sales are attributed to the correct marketing channels. Open your data stream in Google Analytics, then select ‘More Tagging Settings’, then ‘List Unwanted Referrals’. You can then enter myshopify.com as an exclusion.
It’s a good idea to add Universal Analytics to your Shopify store since GA4 won’t allow you to see users travelling through the checkout pages. Simply head to ‘Online Store’, ‘Preferences’ then paste your property ID under ‘Google Analytics’.
How to set up app data collection for GA4
To begin collecting app-usage data, you need to add the Firebase SDK to your app for Android and iOS. Once this is in place, a number of events are collected automatically, such as language, page location and screen resolution.
If you need a hand with upgrading to Google Analytics 4, or just reporting and data analysis in general, we’d love to help – just drop us a message and we’ll be in touch.