The recently launched Google Analytics 4 has many great features, especially for online stores. However, the native integration for Shopify - Google Analytics 4 (GA4) doesn't exist at the moment.
On this page, we have covered everything about Shopify and Google Analytics 4 integration including setup, validation, recommended settings, best practices, and many more.
GA4 is not just a new version of Google Analytics but it also covers amazing new features for Shopify merchants. Follow along the page to get the best out of GA4 & Shopify integration.
As most of you wonder about this, letâs start with what you should do as a Shopify merchant on Google Analytics 4 topic:
Keep your Universal Analytics integration; your existing setup will remain as it is.
Set up Google Analytics 4 on your Shopify store - Google recommends parallel tracking, so do we. âŹď¸
Learn the differences between UA & GA4 and how you can take advantage of the power of GA4. âŹď¸
Apply recommended settings & best practices. âŹď¸
Check the most important GA4 reports for Shopify merchants. âŹď¸
Letâs get started to deep-dive!
How to set up Google Analytics 4 on Shopify
Youâve probably heard about the shocking news from Google:
Universal Analytics (The much-appreciated Google Analytics version that weâve known and used for many years) is being shut down by June 2023.
Implementing GA4 on Shopify involves more than just a simple copy and paste of code snippets. A comprehensive and professional setup is necessary to fully utilize all the features and reporting capabilities, particularly those related to e-commerce.
This article provides an overview of the various GA4 implementation methods available for Shopify. We offer a premium, professional solution and two open-source, do-it-yourself options for the Shopify community.
We have built the solution for Shopify merchants: Analyzify Shopify Data Analytics App & Expert-level support and implementation assistance.
Over 1500+ Shopify merchants have trusted our end-to-end data analytics solution that includes audit, done-for-you setup, and data validation.
Method 1: Analyzify
Analyzify offers more than a great piece of software. We help you with the whole implementation process; and make sure your data tracking is working fine. We offer a Done-For-You setup method at no extra cost.
With Analyzify, you can be confident that your data is accurate and actionable. Our experts audit your existing setup, craft a custom solution for your needs, and double-check all important settings. We also follow up with you to make sure everything is working as it should be.

Here are some of the benefits of Analyzify:
- Data analytics audit & code clean up by experts before the implementation.
- An expert-level, turnkey setup that is tailored to your store.
- Shopify <> Google Analytics 4 integration that covers all e-commerce events.
- Enable GA4âs advanced e-commerce reporting, including user-level metrics.
- Learn how to use GA4 for your business and view the most crucial reports.
- Google Ads Enhanced Conversion Tracking and dynamic remarketing setup.
- Validated data layers and tracking codes for complete accuracy.
- And much more!
Take your data analytics setup to the next level and install Analyzify now.
Method 2: Shopify GA4 Kit (Do-It-Yourself - Free Option)
Our team has prepared an open-source solution that allows Shopify merchants to set up GA4 using Google Tag Manager without using a paid app. We call it Shopify GA4 Kit.
Before you get started with the GA4 Kit, here are the alternative Shopify & GA integration options:
Shopify's Native Integration | Shopify GA4 Kit by Analyzify | đ Analyzify App | |
---|---|---|---|
Universal Analytics | â Included | âď¸ | â Included |
GA4 E-commerce Data | âď¸ | Limited | â Included |
Data layers & Google Tag Manager | âď¸ | Limited | â Included |
GDPR & Consent mode | âď¸ | âď¸ | â Included |
Onboarding & Setup Service | âď¸ | âď¸ | â Included |
Customizations & Expert Support | âď¸ | âď¸ | â Included |
Cost | Included in Shopify Plan | Open Source | $749/ one-time-fee |
By using Shopify GA4 kit and following the carefully-crafted, step-by-step instructions; you will have:
- GA4 up and running on your Shopify store (without an app),
- Product-level reports on your GA4 account,
- Purchase data, sales including product-level information,
- Data layers and Google Tag Manager perfectly work on your store.
We will set up GA4 and e-commerce features using Google Tag Manager(GTM) and data layers. This is the best possible setup method for you because you can use the same GTM setup for other tags such as Google Ads conversions.
We will provide you with everything you need from creating a GTM account to setting up GA4 through GTM on Shopify. Just follow along!
Note: You will get a few external links and additional guidelines within this tutorial to make it easier for you because it is actually a rather complex & multi-step process. Weâve added some the tutorials and the code block on separate pages for you so that we can keep up-to-date and organized.How to set up Google Analytics 4 on Shopify using Shopify GA4 Kit
- Step 1: Add GTM on Shopify
- Step 2: Get Shopify Purchase data layer (inc. product-level data)
- Step 3: Add data layer into the Shopify checkout page
- Step 4: Add data layer into the Shopify product pages
- Step 5: Download Shopify GA4 Kit's GTM Container(Free)
- Step 6: Import GTM Container
- Step 7: Add your GA4 measurement ID
- Step 8: Pause other GA4 tags on GTM
- Step 9: Validate your GA4 setup using GTM's preview mode
- Step 10: Complete your tests and publish
- Step 11: Discover Google Analytics 4
Let's start reviewing the options.
If you already have Google Tag Manager installed on your Shopify store, including the thank you page, you may skip this step. Please make sure that you set up GTM correctly as it will be the main operator of our setup.
You can follow our separate tutorial for this topic to execute the setup and validate GTM installation on Shopify.
Step-by-step Tutorial: Setup GTM on ShopifyMove to the next step once you set up and validate GTM on your Shopify store. We will use GTM to complete our GA4 setup. So it is a required action.
Analyzify offers you a free, open-source purchase and product view data layers for Shopify. This data layer is the new version including the product-level data.
Click on the following link for our Shopify Purchase Data layer page to get the most cutting-edge code block. Copy the code block - and keep that tab open because we will use more codes from the same page. Make sure you copy the data layer code correctly.
Code Block: Analyzify Purchase Data layer for ShopifyMove to the next step once you get the code correctly.
Now visit your Shopify Admin > Settings > Checkout > Order Status Page > Additional Scripts - and paste the code right below your GTM container code.
You should already have the GTM container added at Step 1. Please go back to that step if you donât see your code here.
If you have another purchase data layer added, you can keep both because this one is named differently. Also, feel free to delete your old data layer if you are using it for GA4 - because you are provided with the most advanced one here.
If you aren't familiar with adding codes into your "Checkout Additional Scripts" page, you can visit the previous page that we opened and follow the Step 2 there.
Move to the next step if you have your Google Tag Manager container code, and Shopify purchase data layer together on your Additional scripts.
Visit the Shopify Product Data layer section of the same page to find the code block there. You will also see the steps that you need to add to your product pages.
Follow from Step 1 to Step 4 - up until the GTM actions. Donât move on with GTM actions because we will do it here in the next step.
Now you successfully have added the needed data layers into your Shopify store for GA4 setup including GA4 e-commerce reports.
The next steps will be done through Google Tag Manager. You need to create GA4 tags, triggers, and variables for product view and purchase events.
This is a complex and time-consuming process. We have prepared a ready-to-go Shopify GA4 & GTM container. You will just need to download it, import it into your GTM account and add your measurement ID.
to request & download Analyzify GA4 & GTM Set for Shopify. You will receive an automatic email from us that will include the GTM container with the following content:
Now it is time to import the GTM container you have downloaded.
Step 6.1 - Login to your GTM > Admin (Top menu) > Import Container
This is the only change you will make on the GTM container.
Step 7.1 - Click the variable: ***UpdateMe*** GA4 Measurement ID (G-). You can also find it on the Google Tag Manager > Variables (Left-Menu) > User-Defined Variables
Now we will test the data and the setup using GTMâs Preview Mode. You can get help from screencast if you aren't familiar with Google Tag Manager Preview Mode & Tag Assistant.
- Step 9.1 - Click Preview on the right-top corner of the GTM page.
- Step 9.2 - Add your store URL and click connect. The store should open and it should write âTag Assistant Connectedâ on the right bottom corner.
- Step 9.3 - Visit a product page and go back to âPreview Mode: Tag Assistantâ.
- Step 9.4 - You should be seeing the âanalyzify_productDetailâ event on the left. Click on it.
- Step 9.5 - You should be seeing the âGA4.02 - Event - View Itemâ tag fired. Click on it.
Step 9.6 - Choose âDisplay Variables as Valuesâ from the right top corner.

You can also test the purchase event the same way. We strongly recommend you to follow our Youtube video for further tests and information.
Now you can publish the changes and enjoy your GA4 E-commerce setup. Click SUBMIT at the right top corner of Google Tag Manager, write a container name and PUBLISH.
Method 3: Shopify Pixels (*New)
Shopify recently launched this amazing feature called Shopify Pixels. Our team at Analyzify has worked hard to prepare an open-source solution for Shopify merchants to set up Google Analytics using Shopify Pixels. And here we are - with an amazing result.
How to set up Google Analytics 4 using Shopify Pixels?
- Step 1: Visit Shopify Admin > Settings > Customer Events > Create a Custom Pixel
- Step 2: Name the pixel as: Analyzify Open-Source GA4 v1.0 and move on
- Step 3: Copy Analyzify's open-source pixel for Shopify - GA4 integration
- Step 4: Create a new Google Analytics 4 property for testing purposes
- Step 5: Copy the new GA4 property's measurement ID and replace the G-XXXXXXXXX with your new ID
- Step 6: Paste the code into the pixel, SAVE and connect
- Step 7: Debug the GA4 setup using Google Analytics's DebugView and Real-time reports
- Step 8: Cross-compare the GA4 results within a week.
We strongly recommend using Shopify Pixels with attention. Please make sure to watch the video (below) for the detailed steps. We have also covered the risks and cons using the Shopify Customer Events.
Google Analytics 4 vs. Universal Analytics
GA4 is using a completely new technology and infrastructure that allows many new, exciting features and reports. Some of them are:
- Predictive analysis powered by Machine Learning (ML) and Artificial Intelligence
- Empowered Segments & Audiences features
- Creating totally custom reports (tables or visualizations for cohorts, paths, funnels, or segments)
- Automatically collected events (such as scroll, video view, first_time_visit, and many others)
- Collecting up to 30 conversions and 300 events
- Choosing the attribution model you wish
- Customizing any default tables & reports & menu
- AI-powered anomaly detections
Check out the following guides/help documents to learn more about the topic:
- View this post to learn more about the differences between Universal Analytics & Google Analytics 4.
- Check out Google's official guide on How to get started with the new Google Analytics
- Google Dev Guides: Introduction to Google Analytics 4
How to create a GA4 Account
Letâs make it clear first: You can not create a Google Analytics 4 account, contrary to what the title suggests. You can just create a Google Analytics account with Google Analytics 4 property.
As Google Analytics 4 (GA4) is the new and default version, Google Analytics automatically creates a GA4 property for you when you want to create a new account.
Alternatively, you can also create a GA4 property using your existing Universal Analytics property through GA4 Setup Assistant. By doing so, you can link the accounts so some settings are shared between the properties.
Validation & Key Reports
Doube-checking is something that you would always want to do in the world of data analytics. If you have your GA4 setup done, it is time to double-check if thatâs working properly - while discovering the most important reports and features of GA4.

Check this report to see which products are performing the best. From a performance standpoint, Cart-to-View rate and Purchase-to-View rate metrics are important here.

And as for validation, you need to make sure the product names are correctly visible here. From the âItem Nameâ dropdown you can also change the main dimension to category, brand, Product ID and double-check if the data is correctly being passed.

This is one of the most important reports because it shows the traffic resources and the performance by channels of your Shopify store. You can assess each channelâs performance using the metrics here.
If you see social media traffic and payment providers grouped as âreferralâ - thatâs a sign of a problem and you need to fix it. Youâll see the solutions (UTM and Referral Exclusions) below under recommended settings.

You can make a custom report and see Order IDs and recorded revenue of the specific orders. We use this report to see the orders that are being counted in Google Analytics 4 and cross-compare data with the original Shopify orders. As this is a custom report, you need to take a few steps to complete it. Follow this guide: GA4 & Shopify Data Validation
Recommended GA4 Settings
Apply the following recommended GA4 settings and best practices to get the best out of Google Analytics 4.