Skip to content

Introduction to Google Tag Manager Server-Side Tagging

Google Tag Manager (GTM) is a powerful tool that allows marketers to manage and deploy tracking tags on their website without needing to rely on developers. With GTM, you can easily add tracking tags for tools like Google Analytics, Google Ads, and Facebook Pixel, among others.

Traditionally, GTM has been a client-side tagging solution, meaning that the tracking tags are fired directly from the user’s browser. However, Google recently introduced server-side tagging to GTM, which provides several benefits over client-side tagging.

What is Server-Side Tagging?

Server-side tagging involves firing tracking tags from a server rather than from the user’s browser. This means that the tracking requests are sent directly to the server hosting the website, rather than to third-party services like Google Analytics or Facebook.

Server-side tagging can be particularly useful for large and complex websites, where the volume of tracking requests can slow down page load times. By using server-side tagging, you can reduce the number of tracking requests sent from the user’s browser, resulting in faster page load times and a better user experience.

Server-side tagging can also help to improve data accuracy and security. By sending tracking requests directly to your own server, you can ensure that your data is not being intercepted or manipulated by third-party services. This can be particularly important for websites that handle sensitive user data, such as e-commerce sites or financial institutions.

Why use server-side tracking?

Reference article: Benefits of Server-Side Tracking for Google Ads

What is an example of a server-side tracking?

An example of server-side tracking is tracking user interactions with a website or application by recording the data on a server, rather than on the user’s device. For instance, when a user visits a website and clicks on a link or submits a form, the action is recorded by the server-side tracking system. This data can then be used for various purposes, such as analyzing user behavior, improving website performance, and providing personalized content or recommendations.

A specific example of server-side tracking could be tracking the usage of a social media platform like Facebook or Twitter. The server-side tracking system would collect data such as the user’s interactions with posts, messages, and advertisements, and store them on the server. This data could then be used to generate insights about user behavior, inform targeted advertising campaigns, and improve the platform’s overall performance.

How to Set Up Server-Side Tagging in GTM

Setting up server-side tagging in GTM involves several steps, including:

  1. Choosing a server-side tag vendor: There are several vendors that offer server-side tag management solutions, including Google Cloud, Tealium, and Adobe. You’ll need to choose a vendor that meets your specific needs and budget.
  2. Creating a server container: Once you’ve chosen a vendor, you’ll need to create a server container in GTM. This container will act as a bridge between your website and the server-side tag vendor, allowing you to deploy and manage server-side tags from within GTM.
  3. Configuring your server container: After creating your server container, you’ll need to configure it to work with your website. This may involve setting up data mappings, defining rules for when tags should fire, and integrating with other tools and platforms.
  4. Deploying your server-side tags: Once your server container is configured, you can begin deploying your server-side tags. This involves creating tags within GTM, just as you would with client-side tagging, but selecting the server container as the target environment.

Setting Up Server-Side Tracking with Google Cloud

  1. Create a Google Cloud account: If you don’t already have one, you’ll need to create a Google Cloud account. You can sign up for a free trial or choose a paid plan that meets your needs.
  2. Set up a Google Cloud project: Once you have a Google Cloud account, you’ll need to create a new project for your server-side tracking. You can do this from the Google Cloud console.
  3. Enable the Tag Manager API: In order to use Google Tag Manager with Google Cloud, you’ll need to enable the Tag Manager API in your Google Cloud project. You can do this from the Google Cloud console by navigating to APIs & Services > Dashboard and clicking on the Enable APIs and Services button.
  4. Create a service account: You’ll need to create a service account in Google Cloud to connect your Tag Manager account to your Google Cloud project. To do this, navigate to IAM & Admin > Service accounts and click on the Create Service Account button.
  5. Grant access to the Tag Manager API: After creating a service account, you’ll need to grant it access to the Tag Manager API. To do this, navigate to IAM & Admin > IAM and click on the Add button to add a new member. Enter the email address of your service account and select the Tag Manager API role.
  6. Set up a server container in Tag Manager: Once you’ve set up your Google Cloud project and service account, you’ll need to create a server container in Tag Manager. To do this, navigate to your Tag Manager account and click on the Admin button. From there, click on the Create Container button and select the Server option.
  7. Connect your server container to Google Cloud: After creating your server container in Tag Manager, you’ll need to connect it to your Google Cloud project. To do this, navigate to your server container settings and click on the Server Container Settings button. From there, enter the project ID of your Google Cloud project and the service account key file.
  8. Create and deploy server-side tags: Once you’ve set up your server container and connected it to Google Cloud, you can create and deploy server-side tags in Tag Manager. To do this, navigate to your server container and click on the Tags button. From there, you can create new tags and select the server environment as the tag type.