How to setup GTM Server Side on Shopify

Shopify provides native Google Universal Analytics integration. It works perfectly on all subscription plans. More info and how to set up Google Analytics on Shopify you can find on their official documentation. Also, you can add a GTM web container on all pages of your website if you have Advanced Shopify or Shopify Plus plans. If you are using “Basic Shopify” or “Shopify” plans, you can only add scripts on not checkout pages.

And here is the problem, “Advanced Shopify” costs $299 per month while “Basic Shopify” costs $29 per month, and if the Basic plan is enough, you don’t want to pay more only for adding a GTM Web container to the checkout pages.

Shopify allows changing “transportUrl” in GA settings. It means that you can set up a Google Tag Manager Server container on Shopify instead of a GTM Web container. I hope that this will help you solve all your tracking problems.

For example, with GTM Server-Side on Shopify, you can:

1. Track your sales in CRM

2. Add multiple Google Analytics codes UA/GA4 

3. Add more than one Facebook pixel

4. Send Slack notifications about user’s actions on your website 

5. Add Google Remarketing tags

How to send events to Google Tag Manager Server Side from Shopify

1. First of all, you need to create Google Tag Manager Server Side Container.

2. As an option, you also can set up your domain for GTM SS. It will help you track users more accurately.

3. Now you need to set “transportUrl” in your Shopify account. Go to Online Store -> Preferences and find Google Analytics settings. Then click on “Add custom JavaScript” and set this code where “https://your-server-side-gtm-url.com” is your GTM SS URL.

ga('set', 'transportUrl', 'https://your-server-side-gtm-url.com/collect');

online store google analytics
google analytics account

4. Now you can check that the GA library on your site started to send events to your Google Tag Manager Server Side container.

 GA library send events to Google Tag Manager Server Side container

5. In some rare cases, the “pageview” event sends faster than the “transportUrl” setting applies. And the event does not go to GTM SS. If you have this problem, add this event after the “transportUrl” setting:

ga('send', 'pageview_confirmation');

this will help you measure more accurately.

additional google analytics javascript

I hope this guide will help you solve Shopify tracking issues. If you still experience any of them, our team is always available for a consult. All you need to do is describe the problem, and we will help you find the solution. 

I can guide you through setting up GTM Server Side on Shopify!

 

Write a Comment

Your email address will not be published. Required fields are marked *