Home > Articles > A Step-by-Step Guide to Integrate Google Analytics and Shopify (Most Updated)

A Step-by-Step Guide to Integrate Google Analytics and Shopify (Most Updated)

July 19, 2023
Written and researched by experts at AvadaLearn more about our methodology

By Sam Nguyen

CEO Avada Commerce

Key takeaways

  • Integrating Google Analytics with Shopify can empower entrepreneurs to gain crucial insights into their online business performance. 
  • Using both Google Analytics 4 and Shopify Analytics can allow e-commerce entrepreneurs and digital marketing professionals to decipher and apply data-driven strategies, leading to improved conversion rates and customer experience.

How do I integrate Google Analytics into Shopify?

Step 1: Set Up Google Analytics

Before you can integrate Google Analytics with Shopify, you need to have a Google Analytics account. If you don’t have one yet, follow these steps to set up your Google Analytics account:

  1. Visit the Google Analytics homepage and click ‘Start for free.’
  2. Sign in to your Google account or create a new one if you don’t have one.
  3. Click ‘Set up for free.’
  4. Type in your ‘Account Name’ (usually your business name).
shopify-and-google-analytics-1
  1. Click ‘Next’ and choose ‘Web’ as your measurement model.
  2. Click ‘Next’ again, fill in your ‘Website Name,’ ‘Website URL,’ ‘Industry Category,’ and ‘Reporting Time Zone.’
  3. Click ‘Create.’ Then Agree to the terms and conditions.

Congrats! You’ve set up your Google Analytics account.

Step 2: Enable Ecommerce Tracking

Now, let’s turn on ecommerce tracking within Google Analytics.

  1. In Google Analytics, click ‘Admin’ in the lower-left corner.
  2. In the ‘View’ column, click ‘Ecommerce Settings.’
  3. Set ‘Enable Ecommerce’ to ‘ON.’
  4. Also, switch ‘Enable Enhanced Ecommerce Reporting’ to ‘ON’ for additional insights.
  5. Click ‘Save.’

This will allow Google Analytics to track ecommerce-related metrics.

Step 3: Get Your Google Analytics Tracking ID

Next, you need your Tracking ID.

  1. In Admin, look at the Account column to make sure that you’ve selected the right account. 
  2. Then, in the Property column, click Create Property. Enter a name for the property (e.g. “My Business, Inc website”) and select the reporting time zone and currency.
shopify-and-google-analytics-2

Keep this tab open as you will need it later.

Step 4: Add Your Tracking ID to Shopify

Now, head over to your Shopify account.

  1. In your Shopify admin, go to ‘Online Store > Preferences.’
shopify-and-google-analytics-3
  1. Scroll down to the ‘Google Analytics’ section and select Manage pixel here
shopify-and-google-analytics-4

You can search for the Google app in the app search bar and install it on your store.

shopify-and-google-analytics-5
  1. When you first log in to the Google Channel App page, you will see a blue box to set up GA4. Click “Get started.”
shopify-and-google-analytics-6
  1. Paste the tracking ID you created in Step 3 into the prompt 
shopify-and-google-analytics-7

Step 5: Turn on Enhanced Ecommerce Tracking in Shopify

Lastly, you need to enable Enhanced Ecommerce tracking in Shopify.

  1. Enable Enhanced Ecommerce in Shopify under Online Store > Google Analytics account > Preferences
  2. Click ‘Save.’

Now, your Shopify store is connected with Google Analytics!

You can start monitoring user behavior, conversion rates, and other vital metrics. Analyzing this data will enable you to optimize your online store, tailor marketing efforts, and ultimately, increase sales and business growth. Remember, it might take up to 48 hours for the data to start appearing in your Google Analytics account.

Why is Shopify and Google Analytics different?

At its core, Shopify is your online marketplace. It’s a robust platform where entrepreneurs build their digital storefronts, display their goods or services, and process customer transactions. Think of it as the digital infrastructure that brings your e-commerce vision to life.

In contrast, Google Analytics acts as the eyes and ears of your digital store. This powerful tool from Google is not just about tracking website visits. It’s about understanding the behavior of your audience, the paths they take through your site, and the actions they take. It provides a comprehensive view of your customer interactions, equipping you with the essential data needed to fine-tune your operations.

So, while Shopify provides the stage for your online business to unfold, Google Analytics gives you a front-row seat to the performance, offering insights and data that help you understand your audience and enhance their shopping experience. By integrating the two, you can not only perform your e-commerce operations but also consistently refine them, leading to improved customer satisfaction, higher sales, and sustainable business growth.

Why do you need Google Analytics?

Google Analytics, as it offers a wealth of data that goes beyond what Shopify’s in-built analytics tools can provide.

Shopify Analytics Tools are great for providing basic information such as total sales, customer behavior, and online store sessions. However, they have certain limitations when it comes to understanding the complete customer journey and acquisition sources, among other aspects.

Google Analytics comes into play here. It dives deeper into your store’s data and offers more detailed insights about your customers’ behavior. It helps you understand where your visitors are coming from, what pages they’re viewing, how long they’re staying on your site, and at which point they’re exiting.

The benefit of Google Analytics for your Shopify store is substantial. By knowing how visitors interact with your site, you can make informed decisions about which parts of your site need improvement. Perhaps certain pages are causing visitors to leave, or maybe your landing pages aren’t effectively turning visitors into customers. Google Analytics allows you to identify these issues, and make data-driven decisions to enhance your store’s performance.

In essence, Google Analytics enriches the data provided by Shopify, helping you understand your audience better, optimize your marketing efforts, and ultimately, increase conversions and sales. For both e-commerce entrepreneurs and digital marketing professionals, Google Analytics is a vital tool for maximizing online performance and achieving business growth.

What metrics should you track in Shopify vs GA?

In Shopify, some vital metrics you should track include:

  • Sales: Monitor your total sales, online store conversion rate, average order value, and returning customer rate.
  • Customers: Track total customers, new vs. returning customers, and customer acquisition costs.
  • Products: Keep an eye on top-selling products and inventory levels.

While Shopify provides you with good baseline metrics, Google Analytics (GA) helps you dig deeper. Here are the key metrics you should track in GA:

  • Traffic Sources: Understand where your visitors are coming from – whether it’s search engines, social media, referral links, or direct visits.
  • Bounce Rate: This metric shows you the percentage of visitors who leave your website after viewing just one page.
  • Exit Pages: Identify which pages people most often leave your website from, which may suggest where improvements are needed.
  • User Behavior: Track how visitors interact with your website, such as the pages they visit, the time they spend on each page, and the path they take through your site.
  • Conversion Rate: Similar to Shopify but with the ability to break down by traffic sources, devices, and more.

Shopify And Google Analytics: FAQs

Google Analytics 4, also known as GA4, is the newest version of Google’s popular web analytics service. It provides powerful machine learning capabilities that generate predictive insights about your customers. This version also offers unified data tracking across multiple devices and platforms, which helps you understand the complete customer journey.
Absolutely, Google Analytics is compatible with Shopify. Shopify supports Google Analytics integration, allowing you to access detailed insights into user behavior and web traffic. With this tool, you can track metrics that Shopify’s native analytics may not offer, giving you a broader understanding of your store’s performance.
While Shopify provides its own analytics, adding Google Analytics gives you a more detailed and comprehensive view of your traffic and customer behavior. Shopify’s built-in analytics provides a snapshot of your store’s performance, whereas Google Analytics offers deeper insights such as demographic information, traffic sources, user paths, and behavior on specific pages. So, if you’re seeking more advanced understanding of your website’s performance, integrating Google Analytics with Shopify is highly beneficial.

Discrepancies between Google Analytics and Shopify data can occur for several reasons. They track different actions—Google Analytics mainly tracks user-side actions like page views and clicks, while Shopify records server-side actions like completed purchases.

Time zone differences can also cause mismatches. Google Analytics uses your selected time zone, whereas Shopify reports are in UTC. Plus, if a customer initiates a purchase on one day but completes it the next, Shopify and Google Analytics may record the transaction on different days.

Lastly, tracking issues may occur if a visitor blocks cookies or JavaScript, meaning their activity might not appear in Google Analytics, but Shopify might still track it.

These differences don’t suggest one tool is superior. Instead, Google Analytics and Shopify Analytics complement each other, offering you a holistic view of your site’s performance.

Bottom line

Adding Google Analytics to your Shopify store is a game-changer. It goes beyond basic Shopify analytics, offering powerful insights into customer behavior, source of traffic, and site performance. Whether you’re an e-commerce entrepreneur keen to grow your business, or a digital marketing professional tasked with enhancing online reach, integrating Google Analytics into your Shopify platform is an investment that yields valuable returns. 


Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.