fbpx
shopify-google-tag-manager

Combining Shopify and Google Tag Manager to Boost Your Store Success

by Giles ThomasLast updated on April 3, 2018

Shopify is one of the most popular and powerful ecommerce shopping cart and ecommerce solutions, and it can integrate with one of the most influential website data tools available to online businesses: Google Tag Manager. You’ve likely heard of both and seen some people struggle to combine the two and create a powerhouse ecommerce platform.

If so, you’ve struck gold. We’re going to look at some of the benefits of Google’s Tag Manager and how it can give you data to improve your Shopify store, while also walking you through a few simple steps to integrate the two services.

Give your digital store the boost it needs by linking these two useful platforms, with no real coding knowledge required.

done-for-you service

Set up your Shopify Google tag manager integration

Tested with Google tag assistant and works for any Shopify store plan. Shopify GTM datalayer set up, google tag manager shopify purchase event, up to 5 scripts added as standard and enhanced e-commerce tracking.

Chapter 1
What Is Google Tag Manager?
Chapter 2
8 Ways to Use GTM for Success
Chapter 3
What Do You Need to Set It Up with Shopify?
Chapter 4
Caveats Before Beginning
Chapter 5
Getting Started
Chapter 1

What Is Google Tag Manager?

Google Tag Manager (GTM) is a complementary tool that you can use alongside Google Analytics to better manage your Shopify store.

Essentially, GTM is a simple and direct interface that lets you manage the tags on your website. These tags can help you understand your audience and site performance, such as conversion tracking, remarketing, Google Analytics results, and much more.

The important thing to take away is that GTM makes it simple to add tags to your site. A tag is a little snippet of JavaScript that tells GTM what to do, such as send information to services, track activities, or add another tally to a list.

GTM also makes it easy for you to determine how tags will be applied. It takes away the need to dive into your website code to determine when you add a tag to a visitor or an event. Instead, you get a simple dashboard that is in plain language.

The system operates by creating tags and triggers, which are events that must occur for a tag to be applied. Tags and triggers can range from complex to simple and will help you determine information about your website. For example, if you have a new report, you can set up a tag to track downloads of this report with a “Click Trigger” on your website. You can further refine this with other triggers that might separate out these clicks based on where the site visitor first came from, such as a tweet, Facebook post, or search.

Chapter 2

8 Ways to Use GTM for Success

Now that you’ve got an understanding of what Google Tag Manager is, it’s time to talk about why this matters to your business. Here are a few of our ways to use GTM as well as some reasons to justify the effort.

We’re big fans of Google Tag Manager because it allows you to enhance and improve your business operations. Check out some of our favorite reasons for using GTM or another tag manager:

  1. You can track specific user behaviors on your website and determine if a new piece of content or a new product is generating interest.
  2. You can see how quickly people leave (or how long they stay on) certain product pages or what percentage of your visitors click through multiple pages.
  3. Get a full count of how many individual visitors add products to their cart. You can also sort further by specific products, how many carts are abandoned, and much more.
  4. Track how people find and visit your site, such as coming from social interaction, YouTube video, or clicking on an ad.
  5. See how many people scroll down on your page to see “Recommended items” — if it isn’t a lot, you might need to move those higher to increase your chance of an upsell.
  6. Have a simple record of how many people submit forms.
  7. Monitor intentions to leave a page, showing if you need a pop-up or other notice that could keep them on your pages.
  8. Track how many people click to subscribe to your newsletter, as well as how many click on that little “X” to send your notice away.

And so, so many more. It is an incredibly powerful tool, and you’ve got a lot of freedom to play safely and find the hidden information that can take you to the next level. It helps you unleash the potential of Shopify and identify the best opportunities for efforts like jumpstarting a business through selling wholesale on Shopify.

Here are four big reasons we think you should consider Google Tag Manager:

  1. It’s free. First and foremost, this integration isn’t going to cost you, so you’re getting knowledge without a direct cost.
  2. There are great templates. GTM comes with a variety of built-in tags and triggers for common store actions, so you’re not trying to figure out how to create everything from scratch. There is also a wide range of websites that put out tag “recipes” to help you make the most of the platform while staying safe.
  3. It can speed up many controls and processes for your store. If you’re already using tags or want to start, GTM makes the process simple and removes the need to update code continually.
  4. It’s secure. GTM provides a variety of proven templates, and you can specifically control all permissions for any users. You’ve got to do your normal security due diligence, but the system is widespread because it is safe for almost all.
Chapter 3

What Do You Need to Set It Up with Shopify?

There are three main things you’ll need to set up Google Tag Manager and integrate it with your Shopify account. Here they are:

  1. Google Analytics account. GTM still falls under the company’s analytics tools so you’ll have to start with a Google Analytics account. The great news here is that you can see some major benefits for understanding your website traffic and your audience with this. So, if you don’t have an Analytics account, grab one! It’s worth setting aside some time to learn about the powerhouse of Google Analytics and how you can use it to track your success — especially on landing pages when you’re highlighting new products or big changes.
  2. Google Tag Manager account. Think of this as a beefed-up analytics offering. Tag Manager allows you to manage analytics tools around tags, AdWords conversions, and a variety of other tags across your platform — and the end of our integration, that’ll include Shopify tags too. Signing up is simple on the company’s Tag Manager website. If you don’t have an account, you can sign up during the steps below.
  3. Your main Shopify admin account. You’ll need access to all the settings for your Shopify, so it’s best to work with the main account and not a staff account which may have limited permissions.

Those are the big three things you’ll need, and thankfully they’re easy to gather.

Chapter 4

Caveats Before Beginning

There are a couple of things to keep in mind as you start to integrate GTM with your Shopify account. It can get a little wonky, so take a moment and read these couple items a few times. Everything should make perfect sense as you walk through these steps, but just in case, check back in up here as you go.

So, the caveats:

  • For your Shopify Plus online store, you’ll be copying code snippets that are generated by GTM and then inserting them into the theme.liquid and checkout.liquid theme files in your platform.
  • When you integrate with Shopify, it needs to be the with the Google Analytics integration, instead of going directly through GTM. Here’s Shopify’s note about Google Analytics integration if you want to learn more.
  • GTM will have an “enhanced ecommerce tracking” option that is part of Google Analytics. Do Not use GTM to try and add this tracking to your Shopify store. Right now, Shopify has this element already built-in so if you try to install it via GTM, it can create a duplicate layer that often prevents Shopify from properly using this information.
  • Shopify lists three specifics tags that you should not add through Google Tag Manager. Here they are now (and we’ll remind you again at the step in this process)
    • Classic Google Analytics for Google Analytics
    • Universal Analytics for Google Analytics
    • Facebook Pixel.
Chapter 5

Getting Started

Now that you’ve got your three sets of login information, you’re ready to get started adding GTM to your Shopify store. Remember, we’re looking for Google Tag Manager code snippets, and you’re just adding them to the theme.liquid and checkout.liquid files.

Choose the section below that fits your status: you’re either a first-time Google Tag Manager user or you’ve already set up an account.

First-Time Users

If this is the first time you’re using GTM, it’ll show your snippet as soon as you create your first Web container. Here’s how to get there:

  1. Head over to the Google Tag Manager website.
  2. Sign in with your Google Analytics account information – the username and password will be the same for GTM logins.
  3. You’ll be taken to a “Add a New Account” page. Fill out this information with a nickname for the website and then adding in your site URL. When it asks about a Container, choose the “Web” option. Check out the images below for a little help.

image1

Add in the name of your company, select your country, and then choose if you want to share data or not.

image3

Use your site URL for the container name and then select the Web option.

After you hit create, you’ll get to see your snippets. It should look similar to the image below.

image4

Your snippet will look something like this.

Now, hit the pause button on your online activity! You’ve got your snippets, and now it’s time to jump to our “Shopify Admin Steps” subhead below.

Already a GTM Rock Star

If you’ve already used Google Tag Manager, then you won’t get directed instantly to your snippet. However, it’s just a click away. Look at the right-hand part of your screen and click on “Install Google Tag Manager.”

image2

Image courtesy of Shopify’s superstar Help team.

That button will take you directly to your snippet so that you’re ready for the next step.

Shopify Admin Steps

In a new tab or a new browser window, head over to Shopify and log in with your admin credentials. Follow these steps to add both bits of code.

  1. Click “Online store” and then click “Themes.”
  2. Click “Edit Code” in the Theme drop-down menu.
  3. Go to the Google Tag Manager tab/window and copy the <head> snippet (Google Tag Manager puts this at the top).
  4. Open the theme.liquid file.
  5. Paste the code snippet in the <head> of that file. Typically, it works best if you paste this as high up in the existing code as possible.
  6. Now, open your checkout.liquid file and paste the same <head> snippet as high as you can in the <head> section of the checkout.liquid code.

image5

Here’s what this page looks like when we first navigate to it in our test store.

Take a breath; you’re doing great. Next, we’ll be doing something very similar, just with the <body> snippet.

  1. So, head back to your GTM tab/window and copy the <body> snippet at the bottom.
  2. Go back to your Shopify admin tab and again option the theme.liquid page.
  3. Paste this <body> snippet in the body of the theme.liquid page, again as high as possible.
  4. Now, open the checkout.liquid page.
  5. Paste this <body> snippet in the body of the checkout.liquid page and keep following that “high as possible” mantra.
  6. Click “Save.” (It’s okay, sometimes we click to save an extra time or two just to be sure too.)

Congratulations, you made it through the tricky part. Now, head on over to the Google Tag Manager page and finish any additional steps you need or add in any other tags or elements you’d like. The Google page will walk you through all of this.

There’s one important note that comes directly from Shopify. When you are prompted to add tags, there are three tags you should not add:

  1. Facebook Pixel
  2. Classic Google Analytics for Google Analytics
  3. Universal Analytics for Google Analytics

Fire up the Preview Mode option in Google Tag Manager, and you’ll be able to make sure that GTM installed properly. If you want direct control on the computer you’re using, there are also some browser extensions available, including one named the Google Tag Assistant.

And, now you’re ready to rock. You know the benefits of adding Google Task Manager and now the process for doing it too. Good luck and happy sales.


Author: Jake Rheude
Jake Rheude is the Director of Marketing at Red Stag Fulfillment, an ecommerce fulfillment warehouse that was born out of ecommerce. He has years of experience in ecommerce and business development. In his free time, Jake enjoys reading about business and sharing his own experience with others.

done-for-you service

Set up your Shopify Google tag manager integration

Tested with Google tag assistant and works for any Shopify store plan. Shopify GTM datalayer set up, google tag manager shopify purchase event, up to 5 scripts added as standard and enhanced e-commerce tracking.