The Best Way to Implement Google Analytics on a Shopify Site
How to add Google Analytics to a Shopify Website
Correctly implementing Google Analytics is critical to the optimisation of any website. Without it, you cannot be sure what to improve, and where. In this article HammaJack Co-founder, Jacob Moran, outlines the best way to implement Google Analytics on a Shopify website.
About the Shopify Cart
If a brand is using Shopify it’s a fairly reasonable assumption that they are selling something online, mostly because this is what Shopify does.
Shopify is a great platform. Its simplicity means you can think of a product one day and start selling it online the next. However, with this simplicity comes some restrictions.
One of these restrictions is that Shopify has some pretty strict rules about the checkout (E-Commerce) functionality on its sites. One of these rules is that, unless you are a Shopify Plus customer, you cannot edit the checkout pages of the site.
This may sound like a limitation, but it’s one of the many things that makes Shopify so easy to use, and essentially unbreakable - plus it’s one of the many reasons I prefer it over more open CMs like WordPress.
However, because of this rule, the normal ways of injecting Google Analytics (directly as a code injection or through Google Tag Manager) are not options if you want to track your revenue and product performance… which of course, you do.
Implementing Google Analytics on a Shopify Website
With that being said, using the inbuilt Shopify Google Analytics integration is your only option.
To use this integration, all you need to do is;
In Shopify navigate to Online Store > Preferences
Enter your UAID from Google Analytics
Check “Use Enhanced Ecommerce”
Enable your Google Analytics view to accept Ecommerce data
How to Implement Google Analytics on Shopify Plus
So what about if you’re a Shopify Plus customer? Well, in that case the world is your oyster and you can, and should, be looking at far more advanced tracking solutions. I’d suggest starting with a Measurement Plan and then figuring out your tracking strategy.
Using Google Tag Manager with Shopify
What about if you want to use Google Tag Manager to improve your tracking?
Whilst the Shopify code restrictions do make Google Tag Manager impossible to use on the cart pages (on non-Shopify Pro stores), this doesn’t mean you shouldn’t use it on your non-cart pages to track everything else you might want to track. At HammaJack, we use Google Tag Manager to track super important metrics like video views, heatmapping and newsletter signups. There is nothing stopping you from doing the same.
Most Important Point
When picking a tracking implementation for your website, be realistic about what you need and what you don’t. The simple level of tracking will suit most cases, however, if you’re a digital-first business you should look into using an advanced installation, as this is by far the most beneficial and insightful for you.