How To Add Google Analytics to Shopify

how to add google analytics to shopify

Editorial Process:

Our guides and reviews are written by experts who use their real-life experience. You can learn how we write our reviews by checking our editorial process.

Some links in this article are special affiliate links. If you buy something through these links, we might get a small reward at no extra cost to you. We recommend these products because we’ve used them and really like them. This site isn’t intended to give out financial advice. You can see more about our affiliate links in our privacy policy.

Table of Contents

To run a thriving Shopify store, you must adjust according to valuable data rather than guesswork or assumptions. 

You must set up Google Analytics in your Shopify store to get the correct data. Doing so gives you the necessary information to optimize your site’s performance. 

Google Analytics can help you adjust to increase your store’s search visibility, conversions, and revenue. 

If you don’t know where to start, you’ve come to the right place.

I created this guide to teach you how to add Google Analytics to Shopify. I’ll also discuss essential metrics on Google Analytics you should understand to improve your online store’s performance.

Let’s begin.

How To Add Google Analytics to Shopify 

How To Add Google Analytics to Shopify 

Here’s how to add Google Analytics to Shopify in four easy steps. 

1. Create a Google Account.

You need to set up a Google account to use Google Analytics. 

You can use the same account for this web analytics tool if you already use Google products such as Ads or a Gmail account. 

Ensure you haven’t implemented Google Analytics since enabling it more than once leads to inaccurate Ecommerce tracking reports. 

If you aren’t sure whether you have enabled Google Analytics, follow these steps to check your Google Analytics ecommerce settings. 

  1. Go to the Shopify website and log in to your store account.
FCnNNunyVRAxOV2eZyXorUDcYUX7MXlFyirpV2WLkAdOHqPzgao5V7wguxmQ6SRt2oNkAHgaBf8L6lCFsF1X7fCpDNibvODoH
  1. Go to Shopify admin
  1. Click Settings, then click Apps and sales channel
  1. Click Online store from the Apps and sales channels section.
  1. Click the Open sales channel button. 
  1. Select Preferences.
  1. When you visit the Google Analytics section, there shouldn’t be any code that begins with UA. If you see this Google Analytics code, it means Google Analytics has already been enabled. 
  1. Click the Themes button. 
  1. Click Actions, then click Edit code.
  1. Click {/} theme.liquid in the Layout section. 
  1. Ensure you don’t see these Google Analytics tracking tags in the “{/} theme.liquid” file.
  • dc.js
  • ga.js
  • analytics.js
  • gtag.js.

Seeing these tags means web analytics is already enabled.

2. Set Up a Google Analytics Account.

To set up a Google Analytics account and enable Google Analytics, you need to create Universal Analytics property in Google and add it to your online store. Follow the steps below: 

  1. Go to your web browser and sign in to Google Analytics. 
GvGfq4d2nmtHuXl6VZ9Sc0u0KLWmnxdn LsrEq7sqVzmB mmva kcc1QcdhpS0vvNEUWKAXf3Y35Twgljlq9D86zGoq451NaFgX2BRl4bbNdn8imFSLpQUyKkMA2leRLiWvCLaqEUOX81W G2OoQrY8
  1. Click Admin.
  1. Click Create property in the Account section.
  1. Add a name for the property. 
  1. Click Create a Universal Analytics property only.
  1. Click Next.
  1. Click the appropriate settings. 
  1. Select Create.
  1. Highlight and press Ctrl + C (PC) or command + C (Mac) to copy Universal Analytics property to your clipboard. 
  1. Open your Shopify admin in a new browser. 
  1. Go to the Online store section and click Preferences
  1. Go to the Google Analytics section and paste the Universal Analytics property in the Google Analytics account field. 

Note: Following these steps is essential because Google Analytics 4 properties are not compatible with a Shopify account by default. 

3. Activate Ecommerce Tracking. 

There are two ways to activate Google’s Ecommerce tracking. The first one provides basic information such as transaction and revenue data, while the other one provides more in-depth data like user behavior. 

Activate Ecommerce Tracking. 

Basic Ecommerce Tracking: Steps You Need to Follow

  1. Go to your Google Analytics account and click Admin.
  1. In the View section, select “Ecommerce Settings.
  1. Turn on the Enable Ecommerce toggle.

In case you prefer Enhanced Ecommerce Tracking, continue reading.

4. Set Up Google Analytics Ecommerce Tracking.

Set Up Google Analytics Ecommerce Tracking

(Source: Reflective Data)

Follow these steps for enhanced ecommerce tracking.

  1. Go to Shopify admin
  1. Click Settings, then Apps and sales channels.
  1. Click Online store.
  1. Select Open sales channel.
  1. Click Preferences
  1. In the Google Analytics field, check Use Enhanced Ecommerce. You have to upgrade to the latest version of Google Analytics before you can click the checkbox. 
  1. Click Save to start Google Analytics ecommerce tracking. 
  1. Go to your Google Analytics account and click Admin.
  1. Select Ecommerce Settings in the View column. 
  1. After selecting Ecommerce Settings, click Enable Enhanced Ecommerce Reporting.
  1. Click Save.

Don’t hesitate to customize your Google Analytics setup after following these steps.

Note: Google Analytics won’t track visitors unless you remove password protection from your Shopify store. 

Google Analytics’s Key Metrics You Should Know 

Google Analytics’s Key Metrics You Should Know 

Metrics are quantitative measures that tell how some aspects of your Ecommerce site perform.

An example would be the number of users who visit your Shopify store (website traffic).

Ce HsbGo7vORogQahLeXtkvUMyqMNdxNeRctYECGdADdGXmtx lRmYw56QBy2yx73w0uNwtJo0ajgAybzBxgEpGC2tsnxNDuXOH6wTkhtpL4EKRXsKHq WR12m2QIdmSs2PH2A k5KTO8tE0UGUk rs

Before you enable Google Analytics for ECommerce tracking, it’s nice to learn these key metrics that can help you make the necessary adjustments, and increase your sales. 

Sessions

These are user interactions with your Ecommerce store for a certain period of time. 

Page Views 

These are the total number of page views on a specific page. If you look at product A and navigate to two different products to compare before returning to the first page, it would count as four page views.

Unique Page Views

If you navigate to different products but visit product A page repeatedly, it would still count as one unique page view for the said page. 

Average Time on Page

As its name suggests, it’s how long a user stays on a specific page.

Bounce Rate 

It’s the percentage of visitors to your Shopify website who navigate away after viewing only one page or leaving your store under one second of launching the page. 

Transactions 

The number of purchases your online store generates. 

Revenue

It’s the total revenue your online business generates. 

Conversation Rate

It’s the number of sessions that end up with a transaction (i.e., final purchase).

Ecommerce Tracking Elements

While website traffic can highlight your online searchability, it does not show a complete picture of your store’s performance. 

Here are the two most important things that you should track with Google Analytics:

Customers

Google Analytics’s Ecommerce tracking tool offers features that will help you create a buyer profile, a description of a customer (or a group of customers) that includes demographic and geographic characteristics. 

This web analytics tool also sheds light on your customers’ online behavior and activities.

User Interaction with the Shopify Site 

You can learn how visitors use your website when you use Google Analytics and Shopify Analytics. By understanding user interaction, you’ll get an insight into these things: 

  • Problems your website may have
  • Underperforming products 
  • Web pages that are underperforming due to glitches, poor-quality images, etc. 
  • Forms that aren’t converting

To get an overview of user behavior, click “Behavior” and “Overview.”

From here, you can check your landing pages, product pages, etc., and see which ones require improvements or adjustments. 

Why Add Google Analytics to Your Shopify Store?

Why Add Google Analytics to Your Shopify Store

Google Analytics isn’t just about finding relevant data to determine how customers use your online store. It also allows you to interpret this information to improve the performance of your Shopify site.

Google Analytics involves understanding specific metrics, such as shoppers’ online activities and behavior, to help your online store generate more sales.

Understanding key metrics, such as where your customers come from, which products appeal to them the most, and how long they stay on your online shop, can help your site deliver a better user experience. 

Giving your customers an excellent experience is the key to business growth because it promotes loyalty and high customer retention. 

Google Analytics vs. Shopify Analytics

Providing an apples-to-apples comparison of Google Analytics and Shopify Analytics is difficult because they provide different data sets.

However, here are some factors to help you see the differences between the two analytics tools.

Platform Reliance

Shopify Analytics is only available on Shopify, meaning you lose all your data if you shift to another ecommerce platform like WooCommerce or Wix.

Meanwhile, Google Analytics isn’t limited to a single ecommerce platform or website. You can use Google Analytics regardless of the platform your online store is on.

Insights

Shopify Analytics’ Customers reports are limited to 250,000 customers. To get insights from more than 250,000 customers, you must set up Google Analytics.

Data Limits

Shopify Analytics only gives access to certain data if you’re on more expensive plans, reducing the tool’s helpfulness unless you’re willing to pay more.

Google Analytics’s free version has limited features, but the paid version has no such limits. You don’t need to spend more money to access the data you need.

Upgrading to Universal Analytics in Shopify

If you recently added Google Analytics to your online store, by default, it would give you Universal Analytics, which is the latest version. 

If you enabled Google Analytics to your Shopify store years ago, you likely need to upgrade it to Universal Analytics. 

DJ7CPnQoaF9xTCyCbfr2K p8s2BXJFGto4RMhueWagzBe LyOYG2s675600St24PUjBjyk8ISMbCBc807IUDwD8 hnAEN2DEL5rP

Universal Analytics is the latest version of Google Analytics that offers more powerful data and features.

For example, it allows you to compare user interaction and behavior when they visit your e-commerce store using a mobile device versus a desktop.

You’ll know if you need an upgrade when your Shopify store’s admin page says: “You’re currently using an older version of Google Analytics. Upgrade to the latest version.”

Upgrading to the latest version of Google Analytics lets you access the following insights on ecommerce performance.

  • The number of times your customers have clicked on each product
  • The number of page views each product has generated
  • How long do visitors hang around
  • What state or country they’re from
  • How many people visit your Shopify store

Frequently Asked Questions (FAQs)

Do I Need Google Analytics if I’m Already Using Shopify Analytics? 

No. Enabling Google Analytics is not necessary if you’re already using Shopify Analytics. 

However, using these tools together can provide you with a more detailed view of your customers’ shopping behavior and site traffic. 

The Shopify Analytics dashboard provides information about site performance, page views, number of visitors, and popular search engine keywords.

However, it doesn’t provide insight into customers’ behavior and activities. 

On the other hand, Google Analytics sheds light on user interaction, the most viewed and purchased products, the most popular pages, the length of time visitors stay on your site, the conversion rates, etc.  

Remember, Shopify’s Customer reports are limited to 30,000 customers. Thus, enabling Google Analytics is almost mandatory if you’re running a big online store.  

How Does Google Analytics Work with Shopify? 

Google Analytics inserts a tracking code into each page of your site. So when a user visits your online shop, this Ecommerce tracking code sends data back to this web analytics tool to be processed and analyzed. 

This tracking code is known as a Google Analytics tracking code or Google Analytics tracking tag.

If you don’t see a tracking code in the Google Analytics section of your account, it means you haven’t enabled Google Analytics in your Shopify store.

Google Analytics code also measures the performance of other marketing channels such as paid search, social media, organic search, email marketing, etc.

As a result, it’s a valuable tool if you want to optimize their marketing efforts and sales.

Go to your Google Analytics account dashboard to view relevant data.

Is Google Analytics Good at Tracking Revenue?

Yes! Some people think that Google Analytics is only ideal for website tracking. However, this tool is also good at tracking the revenue and transactions of online stores. 

When you use Google Analytics to collect and analyze Ecommerce data, you want to focus on these things: 

  • The most popular products 
  • Customer behavior and activities in your store
  • Geographical location of your customers 
  • Channels that drive the most sales

Why Are Google Analytics and Shopify Analytics Reports Different?

Some users have reported that Shopify Analytics showed fewer visitors than Google Analytics. The disparity is because these tools track and record visitors differently. 

Despite some discrepancies, I recommend using Shopify Analytics and Google Analytics together. 

The Bottom Line 

Now that you’ve set up Google Analytics and have a basic understanding of the critical metrics that matter most to your store, consider expanding your ecommerce business.
If you’re planning for growth, you may consider upgrading to Shopify Plus. It would help to learn the differences between Shopify and Shopify Plus.

Written by: Omar Deryan

Founder of OJ Digital Solutions

Leave a Reply

Your email address will not be published. Required fields are marked *

Request a Quote

Do you need help with anything in particular? Fill out this form and we'll get back to you.