DEV Community

Cover image for How to set up Google Analytics 4 on Shopify

How to set up Google Analytics 4 on Shopify

Erman Küplü on February 02, 2021

In today's data-driven world, e-commerce businesses rely heavily on analytics to make informed decisions, optimize user experience, and drive sales...
Collapse
 
ekuplu profile image
Erman Küplü

April 2022 Update.

We have created a completely new and enhanced solution: youtube.com/watch?v=hag6ucGxj5E

Make sure to check it out to set up:

  • GTM
  • Data layers
  • GA4 e-commerce events on Shopify.
Collapse
 
protekteknoloji profile image
PROTEK Teknoloji

Great app, will definitely try it. And thanks for the tutorial 👍

Collapse
 
ekuplu profile image
Erman Küplü

Thank you! And let me know if you have any problems.

Collapse
 
ekuplu profile image
Erman Küplü

April 2023 Update:
We have updated the guide and included Shopify's Native integration as a setup option. Additionally, we have added major GA4 ecommerce reports for Shopify merchants.

Collapse
 
searchjayro profile image
Jay Ro

Hey,

So is the technique implementable on Shopify Standard or I should have Shopify Plus for it?

Collapse
 
ekuplu profile image
Erman Küplü

Hey! Sorry for the late reply. You don't need a Shopify Plus. And make sure to check out latest video and solution: youtube.com/watch?v=hag6ucGxj5E

Collapse
 
amkniss profile image
amkniss

Thanks so much! Great article. W

Collapse
 
ekuplu profile image
Erman Küplü

Thanks! Make sure to check our latest solution youtube.com/watch?v=hag6ucGxj5E on setting up GA4 on Shopify including the product-level data and events.

Collapse
 
ekuplu profile image
Erman Küplü

Thanks for your nice words. Checkout our Youtube Channel (youtube.com/channel/UCSa3aE3zQmSRA...) as well. A brand new Google Analytics 4 Course is on its way!

Collapse
 
dengalich profile image
Den Galich

Erman! Thanks for the solution! Is it possible to push purchase items along with the purchase event?

Collapse
 
ekuplu profile image
Erman Küplü

Hello, Den!

It is definitely possible. It is a little more complex and needs the product items to be added into the checkout dataLayer in this format developers.google.com/tag-manager/...

It is challenging because there will be multiple items and you will need to loop them in the checkout code.

In Analyzify, we are using global dataLayers, Google Tag Manager, and passing everything GTM. You can check out our product apps.shopify.com/analyzify

Have you seen the course we just published - youtube.com/playlist?list=PL92pEp_...? In that course, we are adding GA4 and everything through GTM with dataLayers. The products are still not included in the course but you can add new dataLayer elements and adjust yourself if you are a little familiar. Especially after watching the course.

I hope I could help!

Collapse
 
omercan profile image
Omercan Celikler

Is it only working on the purchase event?

Collapse
 
ekuplu profile image
Erman Küplü

Purchase + Page views.