Our knowledge center

Keep up-to-date with the latest digital insights and resources.

  • CRO
  • Ecommerce

Level up your Shopify store with GA4 – Migrate Easily

03 May 2023
Shopify store with GA4

1. Introduction

If you run an online store on Shopify, you know how important it is to track your website’s performance. Google Analytics (GA) is a free tool from Google that allows you to track website traffic, user behaviour, and other important metrics. With the recent launch of GA4, it is important to make the switch to the new platform to stay up-to-date with the latest features and capabilities.

This article will walk you through the steps to add GA4 to your Shopify store for new users and migrate to GA4 for universal analytics users. It will also discuss the benefits of using GA4 with Shopify and address some common pain points that online store owners face when it comes to website analytics.

2. Why switch to Google Analytics 4?

GA4 has a number of advantages over its predecessor, Universal Analytics. One of its most important features is the ability to follow user behaviour across devices and platforms. This is becoming crucial as people interact with websites via a number of devices such as mobiles, tablets, and desktops. GA4 also has more complex tracking features, such as event tracking, which allows you to track CTAs on your website, such as button clicks or form submissions.

Another benefit of GA4 is its emphasis on privacy. As consumers become increasingly worried about their online privacy, GA4 provides numerous features to address these issues, including a more granular approach to data collecting and the opportunity to opt out of data sharing.

3. Adding GA4 to your Shopify store

If you’re new to GA, the process of adding GA4 to your Shopify store is straightforward. First, sign up for a Google Analytics account if you don’t already have one.

  1. Once you have a Google Analytics account, navigate to the Admin section of your account by clicking on the Admin button in the lower left corner of the screen.
  2. In the Property column, click on the drop-down menu and select “Create Property.”
  3. Choose “Web” as the type of property you want to create.
  4. Enter your website’s URL and provide a name for your GA4 property. (Ex: DigitXL Store)
  5. Click “Create.”
  6. You’ll now see your GA4 property in the “Property” column of your GA account. Click on it to access the tracking code.
  7. Copy the GA4 tracking code by clicking on the “Global Site Tag (gtag.js)” option.
  8. Navigate to your Shopify store’s admin panel and click on “Online Store” in the left-hand menu.
  9. Click on “Themes” and select the theme you want to edit.
  10. Click on the “Actions” button and select “Edit code.”
  11. In the code editor, click on the “theme.liquid” file to open it.
  12. Paste the GA4 tracking code into the header section of the “theme.liquid” file, just above the closing </head> tag.
  13. Save your changes and you’re done!

4. Migrating from Universal Analytics to GA4

If you’re already using Universal Analytics on your Shopify store, the process of migrating to GA4 is a bit more involved. However, it’s still a relatively simple process that you can complete in just a few steps.

GA4 operates differently from Universal Analytics, so get ready to create new tracking tags and update your website code. While some data may not be available in GA4, this is your chance to review your current setup and prioritise what data matters most. Let’s dive in!

  1. Sign in to your Google Analytics account and navigate to the Admin section.
  2. In the Property column, select the Universal Analytics property you want to migrate to GA4.
  3. Click on the “Upgrade to GA4” button in the “GA4 Setup Assistant” section.
  4. Follow the prompts to create a new GA4 property.
  5. Once you’ve created your new GA4 property, you’ll need to update your tracking code on your Shopify store. To do this, navigate to the “Settings” section of your Shopify store’s admin panel and click on “Online Store.”
  6. Click on “Preferences” and scroll down to the “Google Analytics” section.
  7. In the “Google Analytics” section, enter the tracking ID for your new GA4 property.
  8. Save your changes and you’re done!

**It’s important to note that after you’ve completed the migration, you’ll need to update any custom reports or dashboards that you’ve created in Universal Analytics to work with your new GA4 property**

5. Benefits of using GA4 with Shopify

Now that you know how to add GA4 to your Shopify store or migrate from Universal Analytics to GA4, let’s discuss some of the benefits of using GA4 with Shopify.

  1. Advanced tracking options
  2. Cross-device tracking
  3. Privacy-focused
  4. Better reporting
Finally, integrating GA4 into your Shopify store or moving from Universal Analytics to GA4 will help you better understand the performance and user behaviour of your website. You can quickly connect GA4 with your Shopify store and take advantage of its vast tracking capabilities, cross-device tracking, and privacy-focused features.
If you’d like to learn more about Google Analytics 4, eCommerce optimisation and how making data-backed decisions for your business affects your sales conversions, then let’s connect!
Book a FREE 1:1 Consultation with us.