You can make assumptions, but there is a saying about those (that I won't repeat here because swearing is rude) that backs the claim that data is king; or queen. Google Analytics is the perfect way to access this data and discover how your customers interact with your store!

If you're interested in scaling your Shopify business and optimizing your website, then you will need access to some very specific information gathered directly from your customers.

In this article, we'll explain exactly what it is and how to integrate it with your Shopify store to ensure you're reaping the rewards you deserve.

  • What Is Google Analytics? 🤷‍♀️
  • Do I Need Google Analytics If I Already Have Shopify Analytics? 👀
  • How To Add Google Analytics To Shopify 👩‍🏫
  • How Do I Know If Google Analytics Is Working On Shopify? 🕵️‍♀️
  • Google Tag Assistant 🧙‍♂️
  • Conclusion 🙌
  • Important disclosure: we're proud affiliates of some tools mentioned in this guide. If you click an affiliate link and subsequently make a purchase, we will earn a small commission at no additional cost to you (you pay nothing extra). For more information, read our affiliate disclosure.

    What Is Google Analytics? 🤷‍♀️

    In a brick-and-mortar store, it's easy to see how long customers stay, what products they are most interested in, and how effective your checkout process is. You also know that most of your customers will live within driving distance. But how do you find this information if you're an online store owner?

    This is where Google Analytics comes in.

    Google Analytics (GA) is a free web analytics tool that can be integrated into your website to track visitor activity and website performance.

    Basically, it's a tool that runs in the background, gathering data based on how your customers interact with your website and products which is then provided in reports that you can access and analyze. It can track up to 200 different metrics with an array of filter options, including (broadly):

    • Traffic - track new and returning users, sessions (interactions a visitor makes within a specific period), average time on page, top landing pages, exit pages, etc.
    • Source of traffic - desktop, tablet, and mobile users, search engine or direct-to URL, paid or organic search, operating system, etc.
    • Demographics - customers by country, age group, gender of people, etc.
    • User behavior - page views, product clicks, search terms used, etc.
    • Bounce rate - the percentage of visitors who viewed only a single page (single-page sessions)
    • Conversions - measure specified conversion goal types (completed purchases, new user registration, downloads, etc.).

    Access to such valuable insights is vital if you want to run a successful online store. You can use the analytics reports to determine how effective your marketing strategies are and where you can improve your user experience.

    Google Analytics acts as your eyes and ears, allowing you to see all your sales funnels in one place, optimize your sales channels, filter out the bad traffic, and mitigate bounce rates.

    Oh, and did we mention that it's free?

    Do I Need Google Analytics If I Already Have Shopify Analytics? 👀

    If you're asking, "Is Google Analytics really necessary?" we're shouting a resounding, "Yes!".

    While Shopify analytics will give you a basic overview of your store's performance (including custom reports on Shopify's Advanced Plan), it might not be in-depth enough if you want to scale your business past a certain point.

    The Shopify Analytics dashboard will show default reports on total sales, average order value, and conversion rates. However, as mentioned above, Google analytics gathers far more specified data for your marketing campaigns and website performance.

    With deeper insights you can make more informed decisions about your marketing campaigns and user experience; the better the shopping experience, the more likely your potential customers will buy what you're selling!

    Google Analytics includes various powerful tracking features that help you identify more specific trends and patterns in user behavior. These features include:

    • Data visualization and monitoring tools with data filtering, manipulation, and funnel analysis capabilities
    • Data collection application program interfaces (APIs)
    • Segmentation for analysis of subsets, such as conversions
    • Custom reports for advertising, acquisition, audience behavior, and conversion with the ability to compare analytics over specified periods of time.
    • Predictive analytics, intelligence, and anomaly detection
    • Integration with other products, including Google Ads, Google Data Studio, Salesforce Marketing Cloud, Google AdSense, Google Optimize 360, Google Search Ads 360, Google Display & Video 360, Google Ad Manager, and Google Search Console.

    How To Add Google Analytics To Shopify 👩‍🏫

    In case you didn't know, Google Analytics currently has two options, Universal Analytics and Google Analytics 4.

    The Universal Google Analytics platform rolled out in 2013 and became the standard for tracking, replacing Urchin Analytics (acquired in 2005). However, as tech continued to progress, Google Analytics 4 was rolled out. This was in 2020. Google has now announced that as of 1 July 2023, GA4 will replace UA as the digital analytics measurement default.

    As you can see, GA4 offers an event-based data model, cross-device and cross-domain tracking, and the use of ML.

    Because both versions are still active, we will cover the basic setup with step-by-step instructions for both below.

    👁️‍🗨️
    Universal Analytics properties will stop collecting data starting 1 July 2023. It’s recommended that you set up a GA4 property before the cut-off date.
  • Set up A Googe Analytics Account
  • Create A Google Analytics Property
  • Set Up Universal Analytics On Shopify
  • Set Up Google Analytics 4 On Shopify
  • Set up A Googe Analytics Account

    First, you'll need to have a Google account. You can use an existing Gmail or Google ads account, but we recommend keeping your personal and work data separate by setting up an account specifically for your Shopify store.

    Once you have your Google account, go to google.com/analytics and click "Get started."

    Once on the analytics page, click "Admin" at the bottom-left of your screen and then click "Create account."

    💡
    Google Analytics works in a hierarchy that starts with an account. Each account then contains properties; within each property, you can have up to 25 views. For those who think more visually, your account is the main house, your properties are the different rooms (website, app, POS devices, etc.), and your views are the different types of furniture/decor

    Enter the name you want for this account under Account name and make sure all the boxes are ticked next to Google products and services, Benchmarking, Technical support, and Account specialists. Click "Next."

    Your Google Analytics account will get a unique ID that forms part of the tracking code that will be inserted into your website/mobile app. You'll generally only need one Google Analytics account per organization, but if you're managing multiple companies, then you'll have more than one account.

    Create A Google Analytics Property

    You will now find yourself on the property setup page. You'll give your property a name on this page and choose a reporting time zone and currency.

    💡
    A property is a website, mobile app, blog, etc., associated with a unique tracking ID and functions as the "room" that houses your reports based on the collected data. Many people find it useful to also set up a property just for testing.

    Scroll down, click on "Show advanced options," and activate the Universal Analytics property.

    Once you've activated the Universal Analytics property, you need to paste in your primary domain (URL) and ensure the circle next to "Create both a Google Analytics 4 and a Universal Analytics property" is checked. Once done, click "Next."

    Your next step is to fill in your business information. This includes your business industry, company size, and how you intend to use Google Analytics.

    Once you have completed this section, click "Create" and accept the terms and conditions.

    You will now find yourself on a page titled Data Streams, where your website should be listed.

    You will see above that it says "Sakura Web - GA4" on the top-left of the screen. This is where you can see all your accounts. Click on it and choose the account you just set up. You can now select the Universal Analytics property or the GA4 property.

    Set Up Universal Analytics On Shopify

    Choose the Universal Analytics property and then open up your admin page again by clicking on the icon at the bottom of the left navigation bar. Under the property column, click "Tracking info" and then "Tracking code."

    You should now see a page that contains your tracking ID and Global Site Tag (gtag.js).

    Now there are two ways to add Google Analytics to your Shopify store; both are easy-peasy!

    Ad Universal Google Analytics To Shopify Using Code

    Copy the code (tracking tag) provided.

    On the Shopify admin page, go to "Online Store" → "Themes." Under your current theme, click on "Actions" and "Edit code."

    On the edit code page, you want to navigate to the theme.liquid file. Once that is open, look for the piece of code at the top that says <head>; you are going to paste the Google Analytics tag directly underneath that.

    Click "Save."

    Add Universal Google Analytics To Shopify Using Edit Theme

    In your Shopify admin, navigate to Online storePreferences, and paste the tracking ID (UA number) into the Google Analytics text box. Click "Save."

    Enable the Enhanced Ecommerce analytics function (for more advanced analytics reporting) and click "Save" again.

    Go to the Google Analytics admin page and, in the views column, click on "E-commerce settings."

    Make sure "Enable E-commerce" is switched to "On." You will then be asked if you want to turn on Enhanced Ecommerce tracking. This is entirely up to you and depends on the needs of your business. The difference is:

    • Basic eCommerce tracking - if you just want transaction and revenue data
    • Enhanced eCommerce tracking - if you want additional information about visitor behavior

    You can ignore the checkout labeling section and click "Save."

    Set Up Google Analytics 4 On Shopify

    As mentioned, Universal Analytics will be replaced by Google Analytics 4 in July 2023. To take advantage of GA4, let's look at the basic setup.

    At the top-right of your screen, where you previously selected the UA property, you are now going to choose the GA4 property.

    Click on "Admin" at the bottom-left of your screen, and in the property column, click on "Data streams." Choose your account and then click on "View tag instructions."

    On the Installation instructions page, select "Install manually." On the screen, you will see the Google tag code.

    As with the Universal Analytics code, you will copy and paste this snippet immediately after the <head> snippet in the theme.liquid code and click "Save."

    💡
    Every time a user visits a web page, the tracking code will collect anonymous information about how that user interacted with the page.

    How Do I Know If Google Analytics Is Working On Shopify? 🕵️‍♀️

    Open up your Shopify store website, go back to Google Analytics, and open your left-hand menu.

    • For Universal Analytics: Under "Reports," click on "Real-time" and choose "Overview."
    • For Google Analytics 4: Under Reports, click "Real-time."

    If Google Analytics works, you should see one active user on your site.

    If your store is not yet live and still has password protection, Google Analytics will not be able to track user activity.

    💡
    Your Google Analytics reports include a real-time audience, acquisition, behavior, and conversions. Google Analytics views allow you to access, customize, and analyze your data by setting up filters.

    Google Tag Assistant 🧙‍♂️

    We thought we'd include a little bit about this handy tool. Google Analytics is rarely used in isolation, and there are many tools that work in conjunction with it to create a seamless data collection and management suite.

    Google Tag Assistant is a free Chrome extension that helps you make sure your tracking scripts are working correctly. These tags include Google Analytics, Google Tag Manager, Google Ads Conversions Tags, Google Remarketing Tags, Floodlight, and Google Optimize.

    After adding the extension, you can navigate to any page on your website/app, and Tag Assitant will list all the tags on that page, give you a report of any errors, and provide suggestions for improvement.

    Conclusion 🙌

    If you're an eCommerce store owner, then Google Analytics will be your new best friend! Gaining core insights into your customer journey, the effectiveness of your social media or email marketing campaigns, return rates,  quality traffic sources, and so much more will ensure that you not only keep your customers happy but also meet critical business goals.

    As you refine your setup, we recommend focusing on key metrics (such as transaction tracking, eCommerce conversion rates, and product performance ) and expanding or changing these as your store grows.