Google Analytics 4 (GA4) is the latest version of Google Analytics that was rolled out in 2023. With the announcement, Google also announced that they will be sunsetting the previous Universal Analytics which will stop processing data on 1 July 2023.
If you’ve set up a new Shopify store and wish to connect Google Analytics 4 for more enhanced tracking, this guide will show you exactly how to do it in easy steps.
Shopify already provides analytics, why do I still need to set up Google Analytics 4 for your Shopify store?
Whilst it definitely isn’t mandatory and Shopify already provides their own analytics in your dashboard, I find that Google Anlaytics provides a more comprehensive breakdown of the traffic going to your store, as well as allows for tracking customizations like tracking your entire sales funnel events, UTM links to organize traffic sources, and more comprehensive event analysis. It also allows you to integrate with other apps like Google ads for more accurate tracking and creation of advertising audiences.
Plus the entire service is free anyway, so there’s really only upside potential by adding the tracking software.
Creating a GA4 account
First & foremost you’ll need to create a Google Analytics account if you haven’t already. Head over to analytics.google.com and sign in using the gmail account that you want the analytics property to be tagged to.
How it works is that your GA4 account must be linked to an email account that’s compatible with Google. This will allow you to login easily in your browser for future use.
The account creation process is easy, all you need to do is create a new account, property and data stream (select web platform). We won’t go into too much detail on the account creation process here, but it should be fairly straightforward.
Google Analytics accounts are organized by Account, Property and Data Stream in that order. One account can have multiple properties, and each property can have multiple data streams.
For instance, for ABC company that has 2 websites. They can create a Account titled “ABC Company”, and two seperate properties for each website titled “abc.com” and “xyz.com”.
Adding code to shopify
Once you’ve created your property and data stream, you’ll be automatically taken to a page with Installation Instructions.

Since we’re installing GA4 on a Shopify store, we don’t have to do it manually. Select the option “Install with a website builder or CMS“.

Select the option Shopify and then copy your tag ID (e.g. G-XXXXXXXXXX).
Next head over to your Shopify admin dashboard in a different tab.

Scroll down to the Google Analytics section and click on “Manage pixel here“.

You’ll be taken to the following page.

Click on the “Connect” button and you’ll be prompted to sign in to your Google account to allow permissions.

In the next step, scroll down and select the correct Google Analytics property that you want to connect and then the green connect button.

Once complete you’ll see a success message. And that’s it! You’ve successfully connected your Google Analytics account to your Shopify store.
Now let’s go ahead and double-check if the set-up is correct. There are two ways to do this, usually I will do both methods to confirm the set-up.
Check 1: Google Analytics Live Report
Open a new browser tab and go to your website URL (your actual website, not the shopify admin page). Once your website is loaded, head back to your GA4 dashboard and click on Reports. This will bring you to the real-time data report.

On the right hand side you’ll see the number of live users on your current website. If it’s showing 1 (or more), then you have successfully configured Google Analytics and it is tracking events on your Shopify store.
Check 2: Use Google Tag Assistant Chrome Extension
If you’re using Google chrome, you can add the Google tag assistant browser extension to check and troubleshoot settings.
Do a quick search for Google assistant chrome plugin or go to this link. Add the extension to your browser and head to your store URL.
Once there click on the extension on the top right, and select Enable.

You’ll then need to refresh your page, click on the extension again and you should see the Google Analytics account installed.

This is also a good way to check if you have any other Google Analytics accounts installed but forgotten about it. I’ve seen websites that have so many different analytics accounts because they create a new one every time as they forgot how to access the old one.
Adding Conversion Events
Once you’ve connected your account, the purchase event should be added by default.

However you can add more events for tracking. I recommned adding Add to Cart and Begin Checkout to better track the flow of your traffic.
You’ll have to wait for 24-48 hours before other events start to show up in your settings.
Admin settings > Events and select the events thatyou want to measure as conversions.
Once you’ve added these events as conversions, you can import all of these conversion events into Google ads to optimize tracking for your ads.