Complete guide how to setup Google Analytics4 (GA4) on Shopify.
This guide is all about how to implement Google Analytics(GA4) on Shopify. To setup GA4 on Shopify website we use Google Tag Manger(GTM) and Shopify data layer.
You can implement all steps, step by step, the further you go, the more advanced and complete your web analytics will be. If you don’t want to implement everything you can also select interesting topic for you and implement it individually.
One more important thing to mention: your previous Google Universal Analytics Shopify setup remains unchanged during this implementation so you can still use it until Google closes it down: July 1 2023.
Part 1
GA4 and GTM account & property setup
This part is just about setting up accounts/tools that you will need to track your Shopify ecommerce.
1. Create Google Analytics account.
2. Create Google Analytics (GA4) property
3. Create Google Tag Manager account
Part 2
Recommended GA4 Settings
If you want to get the best out of Google Analytics 4 apply the following recommended GA4 settings and best practices.
4. Recommended GA4 property settings for Shopify
Part 3
Google Tag Manager implementation
This part is about how to install GTM in Shopify and instruction how to implement most important GA4 tags using GTM that you will need to measure your Shopify traffic and sales performance.
5. Install Google Tag Manager in Shopify
6. GA4 Configuration tag – tracking page views and basic events
7. GA4 view_item tag – tracking which products are most popular
8. GA4 view_item_list event in Shopify
9. GA4 select_item event in Shopify
10. GA4 purchase tag – tracking ecommerce purchases
11. GA4 add_to_cart tag – tracking add to cart events
12. GA4 view_cart event in Shopify
13. GA4 remove_from_cart event in Shopify
14. GA4 login tag – tracking login events
15. How to setup user ID for GA4 on Shopify
17. How to setup Google Consent Mode in Google Tag Manager
Part 4
Linking to other tools
To obtain a comprehensive analysis you can linked GA4 with other tools. Below you will find links to instructions on how to combine GA4 with the various tools.
18. How to integrate Search Console with GA4
19. How to integrate Google Ads with GA4
Part 5
Server side tracking for GA4 tags
If your business relay on data and is able to benefit from greater data accuracy you should definitely consider to setup server side tracking for your GA4 tags.
20. How to setup server side tracking for GA4 on Shopify
If you enjoyed the content please share it:
If you have any question about this topic feel free to comment or react below.
If you want to measure traffic on your Shopify website, the first thing is to create Google Analytics account for your website


If you have Google Account but you don't have GA4 property yet, because for example you are still using Universal Analytics property (former version of GA4) you have to create new GA4 property.


Because we will use Google Tag Manger as a method to implement Google Analytics 4 you have to create GTM account.


If you want to get the best out of Google Analytics 4 apply the following recommended GA4 settings and best practices.


Environment - is a set of necessary elements of technical / software infrastructure, which is the basis for the operation of a given website/application. Google Tag Manager environments are simply multiple versions of the same container. When we have a website with a different version for development, testing, production and QA, instead of creating separate GTM containers for each version, we can set up separate environments in the same container that will work independently in each version.


Some time ago I listened to a podcast from the Technical Marketing Handbook series from Simo Ahava, whose guest was Adam Halbardier from the Google Tag Manager product team. During the conversation, the topic of transparency of data handled by the Server-Side container appeared.


If you plan email marketing campaigns you are interested in the same as with other campaigns, to measure their impact on your business. When you are starting with this topic it is good to know that without additional effort you will not be able to access this impact. You will see no results because Google Analytics will treat traffic from the email campaigns as direct traffic (when users are using your own app) or as referrals (when users are using web email clients).
