How to Set Up Google Analytics & Google Tag Manager Correctly on Your Shopify Store

If you run a Shopify store, tracking your store’s performance with Google Analytics is crucial. A properly configured Google Analytics setup helps you understand customer behaviour, optimise conversions, and grow your eCommerce business. However, many UK Shopify store owners either set it up incorrectly or overlook the importance of Google Tag Manager (GTM) in making the most of their tracking capabilities.
In this guide, we’ll walk you through how to set up Google Analytics and Google Tag Manager correctly on your Shopify store, ensuring accurate data collection and powerful insights.

Why Google Analytics is Essential for Shopify Stores
Google Analytics provides deep insights into how customers interact with your Shopify store, including:
-
User behaviour tracking – See how visitors navigate your site.
-
Conversion tracking – Identify what’s driving sales and where customers drop off.
-
Traffic source analysis – Understand where your traffic comes from (organic search, paid ads, social media, etc.).
-
Customer demographics and interests – Learn more about your audience to tailor your marketing strategies.
However, Google Analytics alone isn’t enough. For a truly powerful tracking setup, you need Google Tag Manager.
The Role of Google Tag Manager in Shopify Tracking
Google Tag Manager acts as a central hub for managing tracking codes and scripts without needing to modify your Shopify theme files directly. It allows you to:
-
Easily add and update Google Analytics tracking.
-
Implement custom event tracking (e.g., button clicks, form submissions, video views).
-
Integrate with third-party tools like Facebook Pixel, Google Ads, and Hotjar.
-
Reduce the risk of errors by keeping tracking codes organised in one place.
Using both Google Analytics and Google Tag Manager together ensures a flexible and scalable tracking solution.
Step-by-Step Guide to Setting Up Google Analytics & Google Tag Manager on Shopify
1. Create a Google Analytics 4 (GA4) Property
If you haven’t already, sign up for Google Analytics and create a new GA4 property:
-
Go to Google Analytics and sign in.
-
Click Admin > Create Property.
-
Select GA4 and follow the setup instructions.
-
Copy your Measurement ID (it starts with ‘G-’).
2. Create a Google Tag Manager (GTM) Account
-
Go to Google Tag Manager and sign in.
-
Click Create Account and follow the instructions.
-
Copy your GTM container code (you’ll need this for Shopify).
3. Add Google Tag Manager to Your Shopify Store
To add GTM to Shopify:
-
Go to Shopify Admin > Online Store > Themes.
-
Click Actions > Edit Code.
-
Open the theme.liquid file.
-
Paste your GTM container code right after the
<head>
tag. -
Click Save.
4. Link Google Analytics 4 with Google Tag Manager
-
In GTM, go to Tags and click New.
-
Choose Google Analytics: GA4 Configuration.
-
Enter your GA4 Measurement ID.
-
Set the trigger to All Pages.
-
Click Save and publish your GTM container.
5. Enable Enhanced eCommerce Tracking in Google Analytics
Enhanced eCommerce tracking provides deeper insights into customer interactions with products, checkout processes, and transactions.
To enable it:
-
In Google Analytics, go to Admin > Data Streams.
-
Click on your Shopify data stream and enable Enhanced Measurement.
-
In Shopify, go to Settings > Checkout.
-
Scroll down to Order Status Page and add the GA4 event tracking script from GTM.
6. Test Your Setup
-
Use Google Tag Assistant and Google Analytics DebugView to verify your tracking.
-
Make a test purchase and check if transactions are being recorded in Google Analytics.
-
Ensure all key events (add to cart, checkout, etc.) are tracking correctly.
Why Correct Google Analytics Setup is Critical for UK Shopify Store Owners
For UK Shopify businesses, having an accurate Google Analytics setup means:
-
Better decision-making with precise data.
-
Improved SEO performance by analysing organic search trends.
-
More effective Google Ads retargeting using GA4 audience insights.
-
Increased sales by optimising high-converting customer journeys.
By setting up both Google Analytics and Google Tag Manager properly, you ensure that your Shopify store is well-positioned to scale and compete in the UK eCommerce market.
Conclusion
Setting up Google Analytics and Google Tag Manager correctly on Shopify is not just a good practice—it’s essential for making data-driven decisions. By following this guide, you’ll gain a deeper understanding of your customers, track key interactions, and optimise your store for success.
If you need expert assistance in setting up Google Analytics, Google Tag Manager, or Shopify customisations, NB eCommerce & Design can help! Get in touch with us today to ensure your Shopify store is fully optimised for tracking and growth.