Server-Side Google Tag Manager: What, Why and How

Have you heard about Server-side tracking?

If you haven't heard about it or have heard but do not know what it is then you should continue reading.

But before I talk about Server-Side tracking, let's understand how traditional tracking (also called client-side tracking) works.

How does traditional (client-side) tracking with Google Tag Manager work?

Almost all marketing analytics tools and pixels provide you a JavaScript code that you need to implement on your web pages.

These JavaScript codes then collect the data from your site and send

If you use a tag manager like Google Tag Manager, Adobe Launch etc. then you will implement their JavaScript on the web pages and put other pixels or code within the tag manager. And when tag manager code loads, it loads the codes of the other providers.

In either case, the 3rd party tracking tools or pixels will be loaded on your webpages.  These JavaScript codes collect the data that the need and send them over to their respective servers (endpoints).
Facebook Pixel send to Facebook servers. Google Analytics sends to Google Analytics servers etc.

However, these JavaScript codes can cause problems, and server-side tracking is the answer to those problems.

  • JavaScript code can read anything it wants from the webpage, browser, etc. So JavaScript pixel from vendor A can read vendor B's pixel data etc.
  • The data goes over HTTP requests so it can be read by hackers.
  • Many ad blockers block these JavaScript calls, resulting in incomplete data. That's why you seeing missing transaction data from GA4 etc.
  • Every JavaScript code add additional load on the page, thus causing increased page load time.

So to counter issues organizations are turning to Server-Side tracking by deploying the tracking in the cloud.

What is Server-Side Tracking

In server-side tracking, instead of sending the data to an endpoint like GA4, Facebook, etc. you send the call to a server in the cloud. The server container resides on your own subdomain so browsers don't detect them as tracking pixels.

On the server, you take the incoming request from the browser and the repackage the incoming request and send it to the desired endpoints such as GA4, Facebook etc.

By doing so you can

  • Bypass adblockers since the call is being made your own subdomain instead of a third party tracking server.
  • Only deploy small GTM JavaScript on the browser (thus speeding up the site load time). This JavaScript sends the calls to the server.
  • All the other endpoints (GA4, Facebook, etc.) are sent the data from the cloud server so they never see users' browsers and can't read any data, nor can the hackers see any data.
  • Only send the data that you want to send. Since JavaScript is not loading in the client's browser these codas can't read anything from the client browser. They only receive the data that you send to them.

Server Side Tracking with Google Tag Manager

Here is the outline of what you will need to do to setup Server-side tracking for GA4.

  1. Create a new GTM container of type server
  2. Click on "Automatically Provision tagging server" option on the next screen
  3. This will do all the setup you need and provide you the server URL. (This URL is a test URL, once you are ready to go live, you will need to change it to your own subdomain).
  4. Next create another regular web or app container.
  5. In the container, instead of sending the GA4 data to GA server, send to server container
  6. When you are read to push the container to the live environment, you will need to change the server URL to your own subdomain.

Need step-by-step details so that you can just follow and set it up on your own? Check out step-by-step course, that will teach you everything you need to learn and move the tags from browser-side tracking to server-side tracking.

Interested?

Signup at https://academy.optizent.com/courses/google-tag-manager-server-side?coupon=GTMSERVER

 

Facebook Conversion API

Server-side tracking is required for Facebook pixels to work properly since many browsers and devices block Facebook Pixels.  As a result Facebook recommend using Facebook conversion API or FBCAPI, which can be easily setup using Google Tag Manager Server Side.

Server-Side Tracking Course

Many non-technical folks might shy away from learning server-side tracking but it is not that difficult.  If you want to learn in an easy way then check out the course that we have created. We don't assume any knowledge of any of the technical stuff and make it very easy for you to grasp the concepts.

Enroll at https://academy.optizent.com/courses/google-tag-manager-server-side?coupon=GTMSERVER

Leave a Reply

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