Shopify has been one of our go to platforms for many of our e-commerce clients. It's quick, easy to setup and the amount of training required for our clients is minimal.

There are a few things such as setting up and installing Google Analytics to being able to track your customers and users that might seem tricky but really is straightforward once you know how to go about it.

To get this all working, you will need a Google Analytics account and of course an online Shopify store that's up and running.

Creating Your Google Analytics Web Property ID

The first step in the process is to setup your web property ID in your Google Analytics account so you can get the right tracking code to add to your Shopify store.

The Google Analytics interface changes from time to time and we try and keep this post up to date with the look of the interface, but the process should be the same either way.

Login into Google Analytics.

You will need to create a new 'Property' under your Google Analytics account. You can do this by clicking on the Admin cog at the bottom part of the screen and then proceed to the 'Create Property' button and screens where you will be prompted for information about the website you are adding to Google Analytics.

Create the property and you will be given the tracking code at the end of the process.

Google Analytics for Shopify

You will need to copy this code and paste it into your Shopify website. You can come back to this page and get the code again if you miss it or accidentally close the page.

This is what our code looks like as it was presented to us from Google Analytics.

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src=""></script>
 window.dataLayer = window.dataLayer || [];
 function gtag(){dataLayer.push(arguments);}
 gtag(‘js’, new Date());

 gtag(‘config’, ‘UA-120524626-1’);

Adding the Google Analytics Code to Your Shopify Store

Now that you have your Google Analytics code, we can add it to the correct area of your Shopify website. Luckily Shopify has a unique area setup to accept your Google Analytics code.

Log into your Shopify store and navigate to Online Store and then Preferences.

Here you will see the area where you can paste your Google Analytics code.

Copy it from where it appeared on the Google Analytics admin page and paste it into the presented area on your Shopify store.

Shopify area where you can add your analytics code

Click Save in the top right area of the website and you're set.

If you're well versed with Google Analytics and wish to customise the way it works, Shopify allows you to add additional Javascript to help accomodate custom tracking and enhance e-commerce tracking on your website.

Enhancing Google Analytics on Shopify

Testing to Ensure Traffic is Being Tracked to Google Analytics

Now that you have added the code to your site, it is important to actually test it and ensure that it is working correctly.

Navigate to the frontend of your Shopify store by clicking on the preview icon from your Shopify Dashboard or typing in the address of the website into a new browser window or tab.

What you've done is now essentially mimicked a user on the website.

Log into your Google Analytics account or go back to the tab where you already have it opened from creating the tracking code.

On the left had side menu, navigate to Real Time and Overview.

If you did it all correctly, you should see yourself appear as a user with the number of users currently on the website and their possible location according to their IP address.

Testing Google Analytics is installed correctly on your website

You have successfully setup and installed Google Analytics for your Shopify store.

Need Help with Your Shopify Store?

If you need help with your Shopify store, our team is more than happy to help. We manage everything from small updates to full Shopify builds and integrations. Contact one of the team members and find out how we can help take your Shopify experience to the next level.