How to deploy and use GA4 with Shopify | NightJarr

GA4 x Shopify integration in 3 steps

Date: Oct 2021

Why integrate GA4 with Shopify?

Image with the logos of Shopify and Google analytics

Tracking your Shopify store with GA4 means you have the necessary data to answer very important business & marketing questions.

It allows you to answer questions like: “Where did my users come from? What are they doing while they are browsing my website? What age and gender are they? Where do they live? Is my Google Ads campaign working?” etc.

Setting up GA4 on Shopify

Step 1: Sign up with Google Analytics

The first thing to do is to go over to Google Analytics and Sign Up for free.

Enter your account name in the space provided and click “Next”.

GA4 Account Setup Step 1

You will be asked to set up a “Property”. Enter the name of your “Property” in the space provided. Select the “Time Zone” and “Currency” that applies to your website, then click “Next”.

GA4 Account Setup Step 2

Now select your “Industry Category” and “Size of your Business”. Once you’re done click “Create” and accept the “Terms and Conditions”.

Step 2: Create a data stream

GA4 will now ask you to set up a Data Stream to start collecting data. This is what will be used to record and track data on your Shopify store. Since you have a Shopify store, select the web setup and copy the URL of your website and paste it in the space provided. Enter the name of your business in the “Stream Name” field and click “Create Stream”.

GA4 Account Setup Step 4
GA4 Account Setup Step 4b

Scroll down and click on the “Global Site Tag”. Copy this entire piece of code. You will install this code into your store in the next step. Note you also have the option to install this via Google Tag Manager.

Note: In GA4, you no longer have to turn on enhanced ecommerce reporting in the view settings as with the previous Google Analytics version (Universal Analytics)

Step 3: Connect your Shopify Store to Google Analytics

Next you have to install this “Global Site Tag” code into your Shopify store. Log into your Shopify online store, and from Shopify Admin, go to “Online Store” and click “Preferences”.

Scroll down on the page until you see the “Google Analytics” section. Now simply paste the “Global Site Tag” code that we copied from GA4 into the box. Make sure to click “Save” after pasting the code.

GA4 Account Setup Step 3


You have now successfully enabled GA4 enhanced eCommerce tracking for your Shopify store. GA4 is now ready to receive your Shopify enhanced eCommerce data. 

You can now start optimizing your Shopify store and start leveraging GA4 reports.

Why use GA4 instead of Universal Analytics

  1. To start with, Shopify analytics reports are dependent on the Shopify plan that you’re subscribed to. For the basic Shopify plan, your analytics reports will be quite limited. To get more advanced insight, you will have to upgrade to an advanced Shopify plan. On GA4 you do not have that limitation.

  2. With Shopify’s built in analytics, you have access to data of a maximum of 250,000 users only. Some eCommerce stores have more than 250K customers.In that case GA4 is a better option for those stores.

  3. GA4 is the most popular and robust web analytics service used by online businesses. Owned by one of the biggest companies in the world today, it doesn’t compromise it’s reputation. Google also releases new features and additions to GA4 on a regular basis.

  4. Without eCommerce reporting, you’re not realizing the full potential of Google Analytics. By integrating Shopify with GA4’s enhanced eCommerce reporting, you don’t only have a  detailed overview of your product’s performance, but you also get access to advanced reports like attribution model comparisons, conversion paths analysis, user lifetime analysis, cohort exploration etc. Not to mention features like data importing that allows you to combine offline sales data with your online data and audiences creation which you can seamlessly use in your Google Ads Campaigns
Eye looking at a grid with a graph

Other benefits of using GA4 to track your Shopify store.

Finger pointing at target on a dotted grid

Know how users are finding your store

The acquisition reports in GA4 allows you to see which marketing channel users are coming from and how users from each channel are browsing your store. You can analyse each channel by different metrics such as sessions, conversions, revenue, etc to understand which channel is most effective at driving your primary business objectives.

Know how users engage with your store

The engagement report in GA4 lets you see which pages are more popular, where users spend more time and which elements of your store they are interacting with. Answering questions like: Are they signing up to your newsletters? Are they flowing through your Shopify store the way you intended?

Know how your products are performing

The monetization reports in GA4 gives you a detailed look at the performance of your online store from a product, sales & revenue perspective. It gives you insight into the performance of each product and answers questions such as: How many products were added to the basket? How many users added a product to their basket but did not complete a purchase? What is the overall conversion rate of my website?

Know more about your store

Not to mention the set of advanced reports available in GA4 such as funnel exploration, path exploration, segment overlap, cohort exploration and more.