March 1, 2023

How to Add Google Analytics to Your Shopify Store (& Why Scaling Brands Need It)

Arrow pointing left
back to blog


When you’re expanding your ecommerce business fast, you need a way to measure your success. The best way to measure your gains on Shopify is to add Google Analytics (GA, for short) to your Shopify store. This allows you to see how your store is performing, what your customers love, and what friction is getting […]

the author

Rhys Williams

share this post

When you’re expanding your ecommerce business fast, you need a way to measure your success.

The best way to measure your gains on Shopify is to add Google Analytics (GA, for short) to your Shopify store.

This allows you to see how your store is performing, what your customers love, and what friction is getting in the way of conversions.

But with so many metrics and ways of measuring them, where do you start?

We’ll assume you’re sold on the benefits of site analytics and know the value of tracking key metrics.

If you need a better understanding of ecommerce analytics in general, you should start here.

In this post, we’ll cover:

Bear in mind the current iteration of Google Analytics on Shopify, Universal Analytics, will be sunsetting in July 2023.

Its replacement, Google Analytics 4 (GA4), will be available in Shopify in March 2023, and we’ll show you what you need to do to prepare.

#cta-visual-pb#Build a high-converting store—code-freeGrow your brand by using valuable analytics learnings to create a shopping experience that drives sales with an intuitive page builder for Shopify.Learn more


Why do you need Google Analytics?

You’ve probably heard a lot about GA and its awesome powers, but why must you use it on your Shopify store? What does it add to your analytics armory that you don’t already have access to natively within Shopify?

What analytics come standard with Shopify?

Shopify has its own in-house analytics tool: Shopify Analytics.

What you get with Shopify Analytics depends on which plan you’re on. If you’re on the basic Shopify package or above, you’ll get:

  • Finance reports: Including fees, bills, taxes, and payments
  • Sales analysis: Including how well your various channels are performing and the ability to view product performance over time
  • A live view of site activity: Including sales, with a map showing where your current visitors are in the world.
  • Acquisition reports: These tell you if your traffic is direct or referred and where your traffic comes from. You can also see some data about which social media channel your customers are coming from and view a geographical breakdown.

There are some more advanced features that some Shopify customers will have access to for free. You can see a full list of functionality here.

What do you get with Google Analytics?

Image: Google

Google Analytics offers you a much more advanced set of tools than you’d get by working with Shopify Analytics alone.

This isn’t to say that Shopify Analytics has no place in your work.

The handy dashboard feature and the tightly-focused reports you can generate will add value when figuring out how your site is performing, particularly when it comes to sales.

A little later on, we’ll run through the things you should track with GA and the metrics best monitored from inside the Shopify platform.

But for now, let’s get clear on what GA is and what it can add to your analytics regime:

  • More customizable: You can set it up to tell you specific things about how your site’s performing, according to the business needs of your company.
  • Offers more customer insights: GA can tell you more about who your customers are, where they’re coming from, and, most importantly, what they’re doing when on your site.
  • Offers enhanced tracking: Whereas Shopify Analytics is limited to information about your store, GA has enhanced tracking capabilities, offering up more meaningful insights into traffic sources, demographics, and customer preferences. This is invaluable when it comes to creating personalized experiences.
  • Integrates with other Google tools: GA can be integrated with other Google products, such as Google Ads and Google Search Console, to provide a more complete picture of your site’s performance.

Why ecommerce brands need Google Analytics for Shopify

The in-depth insights you get with GA hand you a huge advantage when it comes to measuring how successful your site is at appealing to customers and moving them through the customer journey.

Adding GA to your Shopify store and using it regularly will help you:

  • Boost conversion rates. Being able to track how users behave on-site, what pages are most visited, and which ones are most likely to make your customers bounce (to name a but a few key metrics) lets you see what’s working and what’s not. You can then make conversion-boosting changes accordingly.
  • Provide a better customer experience. From letting you know where your visitors are coming from, to breaking down purchases and abandoned carts, GA offers you a view of the entire customer journey. Having a high-level and granular view of how customers experience your site will allow you to make it better.
  • Improve your marketing. The holistic view of your customers that GA provides will help you produce better, more personalized, more relevant content and marketing messages.

#cta-visual-pb#Design customer journeys you can scaleCreate conversion boosting pages and elements once and sync across sub-brands.Learn more


Why you need to set up Google Analytics correctly

If you’ve gotten this far, you don’t need us to tell you about the importance of clean, insightful data to your ecommerce operation.

But it’s surprising the number of marketers who don’t use (or more often, don’t use optimally) analytics tools like GA.

One of the most common mistakes marketers make is not setting GA up properly in the first place.

This mistake is compounded by a lack of understanding of how the tool works. It means marketers are less likely to check in with GA regularly and so lose track of critical metrics and how your site’s performing against your goals.

Some marketers make mistakes in the opposite direction: they expect GA to be the fount of all wisdom and tell them everything they need to know to run their site, attract new customers, and drive sales.

As we’ll see, GA is a powerful tool, but to get the most from it, you need to learn how to set up Google Analytics and use it properly, which we’ll get into later.

What is Google Analytics 4?

The current version of GA that Shopify customers are on is Universal Analytics, but Google announced they will be sunsetting this version in July 2023.

To replace it, they’ve launched Google Analytics 4 (also known as GA4), which will be available on Shopify in March 2023.

GA4 is better adapted to the needs of today’s ecommerce market. Google has summarized its capabilities and the differences with Universal Analytics here. It will:

  • Analyze data from sites and apps
  • Use cookieless data gathering tools
  • Measure events rather than sessions

In the setup guide below, you’ll find links and instructions on how to prepare for GA4.

What metrics should you track in Shopify vs GA?

In general, the types of metrics that you should be tracking:

  • Audience: Who’s visiting your site
  • Acquisition: Where they’re coming from
  • User behavior: What they do when they get there
  • Conversions: How well your site gets visitors to take a conversion action (this could be an actual sale or an action that gets them closer to a sale)

Some metrics you should monitor using Shopify Analytics, while others are best tracked with GA.

Since Shopify Analytics is an organic part of your store, it’s really good at giving you information on sales and product performance. You should use Shopify’s platform to keep track of these.

Google Analytics is best for analyzing your site’s performance, how customers behave on it, and where your traffic is coming from.

How to add Google Analytics to Shopify

The first thing to understand about this process is that there are two levels to your GA setup:

  • Your Google Analytics account
  • Your Google Analytics properties

Step 1: Sign up for Google Analytics

The first thing you should do is create a Google account for your brand and sign up for a new GA account (assuming you don’t already have one).

Doing this is very simple, it’s just a matter of registering your details with GA.

Step 2: Create a GA property

After you’ve done this, GA will prompt you to create a GA property.

A property is a little like a profile, you can set up as many as you want within GA and associate particular sites with each one.

If you have several brands or stores you want to measure separately, you can do so by setting up a different property for each. You can also associate multiple sites with one property.

If you only have one store, you only need to set up one property.

However, for Shopify store owners there is currently a small complication here. As we’ve flagged above, Google is phasing out Universal Analytics and wants to set up all new customers on GA4.

But as Shopify doesn’t yet support GA4, you will have to set up a Universal Analytics property for now, and then make the transition when support becomes available.

Be careful here, GA defaults to setting up a GA4 property, so make sure you’re setting up a Universal Analytics property here.

Step 3: Choose to set up a Universal Analytics or GA4 property

To do this, click on ‘show advanced options’.

Then select ‘create universal analytics property only’.

GA4 lands on Shopify in March 2023, and Google will stop processing data from Universal Analytics from July 2023.

But to help users with the transition, they’ll still make data available for a period of time after this.

Step 4: Connect Google Analytics to Shopify

Once you’ve created your account and property, you’re ready to connect your Shopify store to GA.

On the next screen, you’ll see a text field with some code in it. This is your global site tag and provides an identifier for Google Analytics to track your site

Copy this tracking code snippet, go to your Shopify admin panel, Go to Online store > Preferences, and paste the code into the Google Analytics box.

This is where to put the Google Analytics code in your Shopify account.

And that’s all you need to do to get set up on Google Analytics with Shopify. After this step, you’re ready to make some basic configurations.

Bonus step: Set up Google Tag Manager for event tracking

Adding the global site tag to your admin panel will give your Shopify site a basic way of tracking site data.

But if you want to go deeper than this and track more granular interactions with your site, you will need to add a tracking tag to each web page that contains things you want to track.

This is where Google Tag Manager comes in.

It gives you a simple way to add tags to your pages without the need to get into the coding of your site.

If you’re getting set up on Universal Analytics in preparation for the move to GA4, from March 2023 you will be able to migrate your tags.

But this is not necessarily going to be a straightforward process, so it may be better to just get set up with the basic global tag for now and wait until GA4 becomes available in Shopify.

If you want to know more about the details of GTA and how to use it with Google Analytics, this article is very informative.

How to set up Google Analytics: Key settings to get you started

So you’re all set up on Google Analytics. But what now?

If at this stage, you’re staring blankly at the confusing array of options, filters, numbers, and graphs on the screen, you’re not alone.

You need to make some customizations that will let you understand all this data.

Setting up views in Google Analytics

You can create several ‘views’ in each of your GA properties.

These views apply different filters to the data coming in, so you can more clearly see the specific metrics you want to analyze.

It’s important to understand that the names we’ve given the views here, and similar ones you might come across elsewhere, are just standard naming conventions.

There is no ‘pre-set’ view to choose from in GA, and you can name and configure your views exactly as you please.

But regardless of the technical setup and what you call them, there are some views that every ecommerce brand should set up:

  • Raw/Unfiltered View: This will give you a view of all your data, completely unfiltered. It’s a good idea to set this up before you start creating views with lots of filters applied, as it gives you a ‘fail safe’ place to return to if all your filtering gets too complicated and you’re unsure about the reports they’re producing
  • Filtered/Custom View: You should create a view where you apply all your filters. One of the filters you should definitely apply is ‘filter internal traffic’. This stops your team members’ activity on your site skewing your data analysis.
  • Test View: Create a view where you test out new ways of filtering your data so you can experiment without interfering with your main data analysis view.

To set up views, go to ‘Admin’ in your GA dashboard and, in the far left column, click the ‘create view’ button.

Note: In GA4, separate ‘views’ have been replaced with a single view to which users can apply filters.

Enhanced Ecommerce vs basic ecommerce settings

Once you’ve set up GA, you can choose to stick with the basics or enable enhanced analytics.

Installing enhanced analytics will give you access to a wealth of data that is not available in the basic version.

Enhanced analytics is still free but can take a little bit more effort to set up.

But once you are set up, you can see things like how your customers enter your sales funnel, how they move through it, what your click-through rates are, etc.

For a full rundown of the features and benefits of enhanced analytics and instructions on how to install it, take a look at our guide.

If you’re just starting out with GA, you might want to take some time to familiarize yourself with the basics before installing the enhanced version.

But if you’re serious about maximizing the customer journey and your site’s potential, then you’ll want to get started on enhanced analytics as soon as possible.

Building reports in Google Analytics

The reports section of your GA panel lets you view different data sets from the same place. Building reports will let you track certain things:

  • Demographics: Whether it’s the Universal Analytics version of pre-set reports, or the customizable options you’ll have in GA4, building reports to track the demographics of your site visitors is important. You can set up reports that segment your visitors by age group and gender.You can also build a report based on your customers’ interests. In Universal Analytics, this report is nestled under the Demographics section of your reports.
An example of a demographics report in Universal Analytics
The demographics overview report in GA4
  • How people use your site: In Universal Analytics, this is the report called Users Flow. It will give you a snapshot of how visitors move through your site.

  • Location: You can view your visitors by language or by location. Both are extremely useful for seeing where your customers are coming from. If you’ve just launched a marketing campaign in a new territory and want to see how it’s paying off, or you want an idea of which geographies you should be focusing your marketing and messaging on, this is the ideal place to get that information.
The location report in Universal Analytics
In GA4 the realtime report shows where the customers currently on your site are located
  • Acquisition: This tells you the source of your traffic (or how you’re acquiring visitors). There are several reports you can set up here, the ones you choose will be dependent on what you want to map as a brand. But most ecommerce businesses will find breaking their website traffic down by channel, device, and campaign very useful.
An overview of the social acquisition report in Universal Analytics
Traffic acquisition report in GA4

Goals vs conversion events in Google Analytics

The Goals screen in Universal Analytics

In Universal Analytics you can set up goals to track how well your site is performing. Goals record if a visitor takes a specific action during a session.

Goals have been very useful for merchants to measure KPIs, see which parts of their site are performing well, and which parts need working on.

But they only measure whether an action was taken at all during a session, not how many of those actions were taken.

GA4 measures events rather than individual sessions.

It’s a welcome change in approach, but one that makes goals somewhat obsolete. So rather than setting up goals to measure, in GA4 you can track conversion events.

When a visitor takes a specific action, and you’ve told GA4 this action is a conversion event, it will log it as such, and keep on logging it—regardless of how many times the visitor takes the action during any one session.

But no matter if you’re tracking goals or conversion events, the things you should be measuring are broadly the same:

  • Purchases: You need to be able to see how many sales you’re making.
  • Add to cart: If you can see when visitors are placing items in their cart it not only shows you how successful your product listings are but also how much drop off there is between items in cart and sales made.
  • Navigating to a specific page (called destination goals in Universal Analytics): You want to be able to see if and when visitors are finding their way to your product page and other potentially high-converting pages.
  • Movement through the sales funnel: You can track how your customers are moving through your site and see if they’re progressing through the customer journey as you had hoped.

You can find out more about the technical differences between goals and conversion events here. There’s also a very detailed guide on how to set up conversion events properly here.

If you can’t wait for GA4 to start tracking your conversions, this article from Google has a great run-through on how to set up goals in Universal analytics.

Create the optimal customer journey to convert better

All the data and analysis in the world won’t mean anything unless you can find a way to put it into action.

Shogun Page Builder Advanced lets you design and re-design your pages and elements with ease, scaling and syncing them across multiple stores.

If you want to change something in light of your learnings from Google Analytics, or you’re just at the start of your site creation journey, Shogun provides the tools to create high-converting pages and sites without the need for coding.


#cta-visual-pb#Create consistent journeys across multiple sitesDesigned for larger brands, Shogun Page Builder Advanced enables your team to copy and clone content across your sub-brands and various storefronts with ease.Learn more

You might also enjoy

Get started for free

Get hands on with everything you need to grow your business with a comprehensive suite of tools.
Start now
Arrow pointing up and to the right Arrow pointing up and to the right