How to Setup Server Side Tracking for Google Ads using Stape.io and Google Tag Manager

Ever since January 2024, Google has been slowly pushing out Chrome updates that STOP measuring if you use 3rd party scripts/tags on your page. They will FULLY STOP measuring it from H2, 2024 more info at the Official Google page right here <

So in this guide I’m going to show you step by step how to set up server side tracking for Google Ads using Stape.io as a server container and Google Tag Manager.

How To Create & Set Up GTM Server Container

The first thing we need to do is to create a Google Tag Manager Serves Container. So log in to your tag manager account, select the account where you want to make the container, click Admin and create a new Container.

Container for server side tracking
How to setup server side tracking for google ads using stape. Io and google tag manager 28

Then name your container (enter your website name or whatever), select Server and click create.

Image18 1
How to setup server side tracking for google ads using stape. Io and google tag manager 29

Next select Manually provision tagging server, copy your container config code and save it somewhere in a notepad, you’ll need this later.

Image22 1
How to setup server side tracking for google ads using stape. Io and google tag manager 30

After that you need to create a server container at Stape.io. 

Log in to your account, or create one if you don’t have one already (you can register and start this for completely free), go to GTM Containers and click on the Create container button.

Image5 1
How to setup server side tracking for google ads using stape. Io and google tag manager 31

Then name your container, add your GTM container config code that  you copied and saved from your Google Tag Manager container, select the server’s location and click create container.

Image27 1
How to setup server side tracking for google ads using stape. Io and google tag manager 32

It takes 5-10 minutes max to deploy the container, after that you should see the status ‘’Running’’

Image13 1
How to setup server side tracking for google ads using stape. Io and google tag manager 33

Once it’s running you can click on the container to see your default Tagging Server URL.

Image1 1
How to setup server side tracking for google ads using stape. Io and google tag manager 34

You can use this if you don’t have a custom domain, however, I highly recommend setting up a custom domain for this. You probably already have your website that you want to use for server side tracking, so what you can do is simply create a subdomain and use that as your custom Tagging Server URL.

In our case the website is iamaffiliate.com so we are going to use a subdomain gtm.iamaffiliate.com and use that as the tagging URL.

To set this up, open the sGTM container on Stape, scroll to the domains section, type the domain name, and click Add domain. Once done, you will see DNS records that you should add.

Image8 1
How to setup server side tracking for google ads using stape. Io and google tag manager 35

You can choose from setting CNAME or A records setup.

After that go back to your Google Tag Manager Server container, go to admin and click container settings.

Image10 1
How to setup server side tracking for google ads using stape. Io and google tag manager 36

And paste your Tagging server URL you just created.

Image14 1
How to setup server side tracking for google ads using stape. Io and google tag manager 37

If you use a custom domain for your tagging URL, it’s highly recommended to update the Web GTM script on your website, it will make gtm.js load from your domain.

To do this, simply replace the default googletagmanager.com in the script with your domain.

Image21
How to setup server side tracking for google ads using stape. Io and google tag manager 38

The next step is connecting your Tag ID. Go to GTM and select your Web container and create a new tag and select Google Tag as your tag type.

Then add your GA4 Tag ID (to find it go to Google Analytics → Admin → Property settings → Data collection → Data streams.)

In the Configuration settings add the following parameters:

  • Name: server_container_url
  • Value: your tagging server URL

Add a trigger to fire Pageview on All Pages and click save.

Image19 1
How to setup server side tracking for google ads using stape. Io and google tag manager 39

Next you need to set up the GA4 event. Create a new Tag selecting Google Analytics: GA4 Event type, add your GA4 tag ID and the event name you want to send (in our case it’s add_to_cart). You can find the list of standard event names here.

Also create a custom (add to cart) event for triggering.

Image16 1
How to setup server side tracking for google ads using stape. Io and google tag manager 40

Also create a custom (add to cart) event for triggering. In our case it’s AddToCart event, so whenever someone clicks on the Sign Up or Join Now button on our landing page:

Image2 1
How to setup server side tracking for google ads using stape. Io and google tag manager 41

they will land on iamaffiliate.com/amember/signup

Image11 1
How to setup server side tracking for google ads using stape. Io and google tag manager 42

so we are going to configure the trigger like this:

Image6 1
How to setup server side tracking for google ads using stape. Io and google tag manager 43

Next you need to create a GA4 client. Go to your server container, click client, create GA4 client and save.

Image17 1
How to setup server side tracking for google ads using stape. Io and google tag manager 44

Then create and set up a new GA4 tag, add your Tag ID, and choose a variable in Event Name settings

Image23 1
How to setup server side tracking for google ads using stape. Io and google tag manager 45

and add a trigger: Client Name equals GA4

Image24 1
How to setup server side tracking for google ads using stape. Io and google tag manager 46

To verify the setup, open the Server container preview mode and check that you see GA4 requests. Publish updated inside server and web Google Tag Manager containers.

Image20 1
How to setup server side tracking for google ads using stape. Io and google tag manager 47

If all is good, you can proceed to the next step, which is setting up the conversion linking.

How To Set Up Conversions Linking

So go to your Server container in GTM, add a new tag, select Conversion Linker tag type, and set the Triggering to fire Page View on All Pages.

Image15 1
How to setup server side tracking for google ads using stape. Io and google tag manager 48

Create Your Google Ads Conversion Action

Next before you create a Google Ads Conversion Tracking tag, if you haven’t yet, you need to configure a conversion action in Google Ads. To do that go to your Google Ads account, select Goals, Conversions and add New conversion action.

Image3 1
How to setup server side tracking for google ads using stape. Io and google tag manager 49

In our case we are going to set up an AddToCart event for this example. When it’s done you need to click on Tag setup and select Use Google Tag Manager, and copy the Conversion ID and Conversion Label and save them somewhere.

Image12 1
How to setup server side tracking for google ads using stape. Io and google tag manager 50

Create a Google Ads Conversion Tracking Tag

Now you can create your Google Ads Conversion Tracking tag in Server container GTM. So create a new tag and enter your Conversion ID and Conversion Label:

Image26 1
How to setup server side tracking for google ads using stape. Io and google tag manager 51

For the Triggering you can set up a Custom Event and enter the event name (add_to_cart in our case)

Image25 1
How to setup server side tracking for google ads using stape. Io and google tag manager 52

Click save and that’s it, now if you followed all the steps, your Google Ads server side tracking should work.

How To Test Your Setup

To test your setup open the Server container preview mode and check that the Google Ads Conversion tag triggered 

Image7 1
How to setup server side tracking for google ads using stape. Io and google tag manager 53

and the request it sent is correct.

Image4 1
How to setup server side tracking for google ads using stape. Io and google tag manager 54

Now this is just one example for setting server side conversion tracking for an AddToCart event, you can configure all kinds of custom conversions and events, following the same steps.

Did you like this post? Please share it with friends to support this blog

Leave a Comment

Search

#1 Affiliate Marketing Book

From Zero to Super Affiliate Amazon.com

From Zero to Super Affiliate - The newbie affiliate marketer bible

Buy Now At Amazon.com