100+ Templates, 50+ Lessons, 30+ Guides, 1 Amazing Community!
→ CLICK HERE TO JOIN THE SHECOM INSIDERS ACADEMY ←

How to Properly Set Up Google Analytics on a Shopify Store

For a fabulous e-commerce entrepreneur (like yourself), Google Analytics is a really crucial tool to use. We know that Shopify has awesome analytics already built in, but the sooner you also get set up on Google Analytics, the better. It can provide a lot of data about your website and your customers beyond what Shopify offers. It will also pay off for you down the road, if your business decides to to run any search ads. In this tutorial, we will go over all of the basics of installing Google Analytics on a Shopify Site.

You might feel a little overwhelmed when you first look at Google Analytics, and therefore want to put this off. It’s not an absolutely urgent need for your business, and it can look pretty complex -- we totally get that -- but the sooner you set it up, the more data you’ll have when you need it in the future. We hear a lot of the same things:

I think I have a Google Analytics account, but I’m not sure what to do with it.”

“Google Analytics goes way over my head.”

“I know I should do something with it, but I don’t know where to start.”

Does this ring a bell? Maybe you have even said these word for word? Then girl, this tutorial was designed just for you. We will take you through all the necessary steps to get you where you need to be with Google Analytics. There are four major sections we will guide you through:

  1. Making sure you don’t have Google Analytics enabled already
  2. Setting up your Google Account
  3. Enabling Google Analytics
  4. Turning on Ecommerce tracking


Like with all SheCom Tutorials, we like to provide you with what you should expect so you can help budget your time and money in the best way possible. You should expect to spend the following resources completing this tutorial:

TIME:

Set aside a few hours for this tutorial to ensure you have everything set up correctly. Once it’s set up, you’ll also need to set aside time (either once a week or once a month) to analyze your findings.

MONEY:

Your Google Analytics account is free!



Section 1: Do you already have it?

This is an important first step because if you enable Google Analytics more than once it results in inaccurate data. If you’re 100% positive that you’ve never enabled Google Analytics for your store, then feel free to skip this step. If you’re a little weary and can’t remember, then follow these steps to be confident.

Step 1 - From your Shopify admin, click Online store > Preferences.

Step 2 - In the Google Analytics section, make sure that the text box is empty (It should have the text Paste your code from Google here, but that is all). If you see this, then continue on to Step 3.

If you see a code beginning with UA- instead, then you have Google Analytics enabled already and can skip to Section 4: Turn on Ecommerce Tracking.

 

We're going to run one more double check to make sure you don't already have Google Analytics installed.

Step 3 - Click Themes.

Step 4 - Click Actions > Edit code.

Step 5 - In the Layout section, click {/} theme.liquid.
Open the theme.liquid file, look above the <head> section for the following Google Analytics tracking tags: ga.js, dc.js, gtag.js, or analytics.js. If you see any of these tags in your theme.liquid file, then you have Google Analytics enabled already and can skip to Section 4: Turn on Ecommerce Tracking.

If you don't see a tracking code in the Google Analytics section of your Preferences page, and you don't have a Google Analytics tracking tag in your theme.liquid file, then Google Analytics is not enabled on your store yet.  

Section 2: Setting up a Google Account

Setting up a Google Account is the very first step to setting up your Google Analytics. Note: If you already use Google products, such as Gmail or Ads, then you can use the same account for Google Analytics and you can move onto Section 3. If you need to set up a Google account, go here to create a Google account.

Section 3: Enabling Google Analytics

These next steps to enable Google Analytics will depend on whether you've used your Google account to set up Google Analytics before or not.

How to Enable Google Analytics if you Have Never Used it Before:

Step 1 - In a web browser, open Google Analytics.

Step 2 - Choose the Google account you want to sign in with, or click Add account to sign in with a new Google account, then click Sign Up.

Step 3 - Choose Website and fill in the required information. Use your primary domain for the Website URL.

Step 4 - Click Get Tracking ID.

Step 5 - Use the drop-down menu to select your country if it is not already selected, then click I Accept to acknowledge that you have read the terms of service.

Step 6 - On the next page, you'll see a lot of information and options. The only thing you need is the Global Site Tag. Copy the global site tag to your clipboard by highlighting it and pressing ctrl+C on PC or command+C on Mac:

Step 7 - In a new browser tab, open your Shopify admin. Then go to Online store > Preferences.

Step 8 - In the Google Analytics section, paste your global site tag in the Google Analytics account field:

Step 9 - You'll know that Google Analytics is enabled on your online store when you see a code beginning with UA- under the Google Analytics account heading (See below). Note: Google Analytics cannot track visitors until you have removed password protection from your online store.

How to Enable Google Analytics if you Have Used it Before:

Step 1 - In a web browser, open Google Analytics.

Step 2 - Click SIGN IN and select Analytics in the drop-down menu.

Step 3 - Choose the Google account you want to sign in with, or click Add account to sign in with a new Google account. Then click Admin.

Step 4 - Click + Create Account.

Step 5 - Choose Website and fill in the required information. Use your primary domain for the Website URL.

Step 6 - Click Get Tracking ID.

Step 7 - Use the drop-down menu to select your country if it is not already selected, then click I Accept to acknowledge that you have read the terms of service.

Step 8 - On the next page, you'll see a lot of information and options. The only thing you need is the Global Site Tag. Copy the global site tag to your clipboard by highlighting it and pressing ctrl+C on PC or command+C on Mac.

Step 9 - In a new browser tab, open your Shopify Admin. Go to Online store > Preferences.

Step 10 - In the Google Analytics section, paste your global site tag in the Google Analytics account field:

Step 11 - You'll know that Google Analytics is enabled on your online store when you see a code beginning with UA- under the Google Analytics account heading (See below). Note: Google Analytics cannot track visitors until you have removed password protection from your online store.  

Section 4: Enabling Ecommerce Tracking

Turn on Basic Ecommerce Tracking

Step 1 - In your Google Analytics account, click Admin.

Step 2 -In the View menu, click Ecommerce Settings.

Step 3 - Click the Enable Ecommerce toggle to turn it from OFF to ON.

 

Turn on Enhanced Ecommerce Tracking

Step 1 - Open your Shopify admin.

Step 2 - Go to Online store > Preferences.

Step 3 - In the Google Analytics section, click the Use Enhanced Ecommerce checkbox. If you're using an older version of Google Analytics, then you might need to click Upgrade to the latest version before you can click the Use Enhanced Ecommerce checkbox.

Step 4 - Click Save.

Step 5 - In your Google Analytics account, click Admin.

Step 6 - In the View menu, click Ecommerce Settings.

Step 7 - Click the Enable Enhanced Ecommerce Reporting toggle to turn it from OFF to ON.

Step 8 - Click Save.
 

 

Voila! Google Analytics is officially installed on your site and will begin tracking data. Be sure to double check Google Analytics in a day or so that you see traffic happening on your site (or even head to your homepage a few times to test it out right away)! Happy data tracking! 

Know Your Numbers & Boost Engagement! Grab Our FREE Social Insights Workbook.

This tutorial is from our SheCom Guide to Shopify Success: 5 Mistakes You May Be Making on Your Shopify Site.

Want to step up your website even further? Grab our Expert Guide and polish your online store to perfection:

  

FREE DOWNLOAD

The SheCommerce Handbook for:
Keywords & Hashtags

Close

50% Complete

Almost there...

Fill out the form below to get notified when the SheCom Insiders Academy launches - and be the first to join this game-changing community of fabulous women! When you sign up, you'll be re-directed to join our FREE Facebook Group to mingle while you wait!