Complete guide how to setup Google Analytics4 (GA4) on Shopify.

Published by
Oct 12, 2022

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

16. GA4 – conversion events

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

Published Oct 12, 2022 by Piotr Ulacha, Anna Bacciarelli

Information About the Authors

Piotr Ulacha

Piotr Ulacha is a web analyst. He has 15 years of experience in the digital marketing area. He specializes in implementation of analytical and marketing tracking codes, creating dashboards and data privacy topic. He works currently as a Web Analyst at EverStores.com where he implement tracking solutions for eCommerce brands. Previusly he worked at SellerX with eCommerce brands and at Artegence where he analyses the impact of marketing campaigns for Volkswagen Poland.

Anna Bacciarelli

During twelve years of professional work, I have gained experience in various positions in many fields. The variety of classes and professional experience taught me openness, independence, creativity, a positive approach to people and teamwork.Currently, I would like to focus on a new, extremely interesting path that is IT, and more specifically internet analytics. From the beginning of 2022, I have been gaining experience using the following tools: Google Analytics, Google Tag Manager and Google Data Studio.


If you enjoyed the article please share it:

Other articles about Shopify
1. How to create Google Analytics account for Shopify website

If you want to measure traffic on your Shopify website, the first thing is to create Google Analytics account for your website

Published by Piotr Ulacha
Oct 13, 2022
2. How to create Google Analytics (GA4) property for Shopify 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.

Published by Piotr Ulacha
Oct 14, 2022
3. How to create Google Tag Manager account for Shopify website

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

Published by Piotr Ulacha
Oct 15, 2022
4. Recommended GA4 property settings for Shopify

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

Published by Piotr Ulacha
Oct 16, 2022