Google recently announced they are phasing out third-party cookies, which has many people worried about the future state of their Google Ads tracking.

One of the solutions being talked about a lot is server-side tracking, which we discussed in further detail in this blog post.

Following on from this article I decided to implement server-side tracking myself using Stape.io.

How I thought it would go

After watching PPC Mastery’s Conversion Tracking Mastery course I was excited about the benefits of server-side tracking, and how straightforward implementation seemed.

The course is a walk-through implementation guide, and it is the most detailed walkthrough I have found so far.

Stape.io also has a blog and other resources available, as well as an active community for FAQs you might have.

How it actually went

One of the initial hurdles I thought would be integrating Google Tag Manager with Shopify, which typically requires a custom pixel to work.

But Stape has that covered with their Shopify GTM app that would pass through all the data I needed.

I was feeling confident that I could have this done in a month.

The Setup

So I’ll preface this by saying I am by no means an expert with JavaScript, but you could say I know enough to be dangerous.

I’ve implemented tracking using gtag’s, Google Tag Manager, and setup enhanced conversions for clients across multiple CRM’s, and overseen the migration of many clients onto GA4.

The amount of work you are going to have to do depends on how your tracking is currently set up. Stape.io requires Google Tag Manager, as you need to utilize the container data for both the web and server-side.

My tracking set up started with the following:

  • Shopify Advanced: theme liquid & checkout scripts enabled
    • Google Ads gtag with enhanced conversions
    • GA4 setup through gtag

To enable server-side tracking I was going to have to start everything all over again.

Starting to think this may take longer than a month to complete.

Step by Step Guide

Again each of these steps may differ depending on your existing CRM and tracking setup, but in my case I was looking to do the following:

Implement Stape.io server-side tracking for GA4 & Google Ads with Google Tag Manager on Shopify.

For each step within this article, I have linked to each of the resources I used, with detailed notes I learned along the way.

Step 1: Install GA4 with Google Tag Manager – There are a lot of guides out there, but I find @Lovesdata the easiest and most consistent. If you don’t catch it in the videos here is the updated pre-configured container for GA4 variables. Read the readme file before importing in to GTM.

One issue with this approach is the simplicity. All e-commerce events in the pre-configured GTM container are configured under one tag which can lead to issues.

Each event should be configured with a separate tag, a separate trigger and, variables. This way you will be sure that all events are sent correctly.

How it should look:

Also: Each event tag should be populated with event parameters that utilize the correct data layer variables:

Fortunately the pre-configured container comes with all the variables, you just have to assign them to the different events.

For more information on how to set up GA4 events with Tag Manager see Google’s support.

Step 2: Create GTM web & server containers – This was probably the most straightforward part of the process, but there are a few caveats.

The domain settings example shown refers to Cloudflare. Shopify users should navigate to Settings > Domains > Select: Primary domain > Click: Domain Settings tab (Top right) > Edit DNS Settings

Step 3: Setup Google Ads conversion tracking in Shopify – Using Stape app. Make sure to enable the app in shopify app embeds, this isn’t initially clear in the stape.io guide, so multiple people posted about this in the community:

How to find Shopify app embeds:

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find the theme that you want to edit, and then click Customize.
  3. On the sidebar, click the App embeds icon.
  4. Select the app embed that you want to activate or click the Search bar and enter a search term to search through your installed apps.
  5. Beside the app embed that you want to activate, click the toggle to activate it.

Step number 8 in the Stape guide requires you to add the Conversion ID and Conversion Label values which are generated in Google Ads.

Start at step 2 in this guide by Google, and if you’ve completed everything correctly you should start to see server-side conversions coming through.

Conclusion

One of the problems with trying to implement this solution on your own is the overwhelming amount of resources available. Some of which are outdated, and others provide inconsistent information.

This implementation is a lot quicker if you have Google Ads and GA4 already set up via Google Tag Manager.

I do not recommend going into this without prior experience with Google Tag Manager or GA4 implementations. If you have the budget work with Stape’s agency experts to have them set up tracking.

I ended up getting them to do an audit of my work and have found it very insightful, furthering my understanding of how things should be set up, and pointing out some additional functions to take advantage of.