Google Analytics 4 (GA4) Integration Idea

Highlighted
New Member
3 0 2

I've read all the posts on this forum about Google Analytics 4 and how Shopify doesn't support it yet (because they only accept UA tags).

Some suggested that we can manually install the code into our Shopify theme.liquid file in the HEAD section, but that's only a half solution because unless the tag fires on the Checkout page, you're not getting any conversion data. 

My question... can't we simply paste the entire g.tag tracking code into the Settings --> Checkout --> Additional Scripts section and call it a day?

screenshot-rondeno-culinary-designs.myshopify.com-2020.11.22-11_32_20.png

I understand that you need Shopify Plus to edit the checkout.liquid file, but for the rest of us, aren't we accomplishing the same thing by pasting the following complete script into that Additional Scripts area?

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TVE9BVKK0C"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-XXXXXXXXXX');
</script>

 

 I just tried this on one of my Shopify sites, so I can't report back whether it tracks conversions, but I will update this thread and let you know. 

Has anyone else tried this on one of their sites and had success?

0 Likes