BLOG EC Blog : Shopify and more

How to set up GTM in Shopify (unofficial)

*Update: August 2020: The content of this article is not currently available for newly opened Shopify stores.

What is GTM (Google Tag Manager)?

This may not be necessary for those of you reading this article, but let me first give you an overview of Google Tag Manager (GTM).
Google Tag Manager is a service that allows you to centrally manage tags for Google Analytics, AdWords, and other measurement tools. Previously, you had to add tags directly to the html whenever you added a new tool, but with GTM, you only need to write tags in the html the first time, and you can centrally manage subsequent tag additions and deletions on GTM.
We will not go into detail about how to use and configure GTM itself, as this is outside the scope of this article.

How to set up GTM on Shopify

Now, here we get to the main topic.
Setting up and using GTM with Shopify requires some technical work. The reason is that Shopify has a default setting for Google Analytics, but no setting for GTM. So, I will explain step by step how to set up "what and where" (basically just copy and paste).

You will be switching back and forth between the GTM and Shopify sites, so it is easier to keep them open in separate tabs.

[1] Log in to the GTM page and select your account.
When the screen below appears, click on the container ID.

How to Set Up GTM in Shopify

[2] When you click the container ID, a pop-up will appear with the source code you can paste into your website.
First, copy the entire contents of the box at the bottom.

How to Set Up GTM in Shopify

[3] Next, go to the Shopify admin screen.
Click "Online Store" from the menu on the left, and select "Edit Code" from "Actions" for the theme you're currently using.

How to Set Up GTM in Shopify

[4] Click on “theme.liquid” in the Layout folder to display its contents.

How to Set Up GTM in Shopify

[5] Look for the opening tag of the body. When you find it, paste the code you copied earlier right after it and click the Save button.

How to Set Up GTM in Shopify

[6] Return to the previous GTM screen.
This time, copy only the selected area in the top box.

How to Set Up GTM in Shopify

[7] Go to the Shopify admin screen again.
Next, find the "Google Analytics" settings section in the "Various Settings" under Online Store and click on "Add Custom JavaScript."

How to Set Up GTM in Shopify

[8] Paste the content copied in step 6 and click the Save button at the bottom of the page.
This completes the setup on Shopify.

How to Set Up GTM in Shopify

How do I check my settings?

I would like to introduce a tool that can help you check whether GTM is set up and working correctly. It is a Chrome extension made by Google called " Tag Assistant (by Google) ". Please watch the video in the overview to learn how to use it.

The content introduced in this article is unofficial and not a method officially announced by Shopify. Please note that it may no longer work due to future changes in Shopify specifications.
Also, Shopify's Plus plan allows you to set up GTM by default, so if that doesn't work, please consider this option.

Related Works その他事例

RUN-WALK Style Official Online Store

  • Site renovation/development
  • Site construction
  • Logistics support

Dozle Store

  • Site renovation/development
  • Site construction
  • Logistics support
  • Operation

NAVAL Online Store

  • Consulting
  • Site renovation/development
  • Site construction

Kamakura Beniya Official Online Shop

  • Site renovation/development

HALEO official online store

  • Consulting
  • Site renovation/development
  • Site construction
  • Logistics support
CONTACT
ご相談や依頼、お見積りをご希望の方