Server-side Tags in Google Tag Manager

In August 2020, Google introduced a new type of container in Tag Manager, where tracking codes run on the server side. What does it mean in practice and why it is recommended to implement it as soon as possible?

Google Tag Manager

Google Tag Manager (GTM) makes it possible to manage tracking codes such as Google Ads tag, Facebook pixel or Google Analytics tag without programming skills.

Of course, you have to add the GTM container snippet into the website or application code, but then any changes to the tracking codes are managed via the Google Tag Manager interface.

The Tag Manager significantly simplified the work with codes, accelerated their implementation, modification and updates, as well as reduced the number of configuration problems, accidental deletions and other human errors.

The server-side revolution

In the traditional version of the GTM, the tracking codes run in the browser. When loading the page, the relevant codes are automatically fired from the container, depending on the conditions defined in the Tag Manager.

In the server-side GTM, data is sent direclty from the serve to Google Ads, Analytics, Facebook, etc. A new entity in the system is responsible for communication with the website and the server-side tags: the Client.

As it all is registered under the website subdomain, the browsers interpret it as 1st party data transmission by the website server. 

Game changer

Server-side GTM has significant advantages over the traditional solution:

  • Improved Performance:  Fewer tracking tags mean less code per page and less information to be processed by the browser, and therefore the risk of data loss is smaller.
  • Increased security:  User data is better protected as it is transferred directly to Google, Facebook etc. servers (not through the browser).
  • Higher resistance to tracking blocking: Cookies created this way are not blocked by adblocks or Intelligent Tracking Prevention (ITP) solutions in Safari.

Server-side GTM is a response to the increasing data security expectations and, above all, to the restrictions of processing script-generated cookies by the Internet browsers. Please note that ITP for Safari in the latest versions limits the lifetime of cookies generated by scripts to 7 days, and in some cases – to 24 hours. Other browsers are introducing or planning to introduce similar solutions.

What does it mean in practice? If the user returns to the website after 7 days from the last visit, Google Analytics interprets this visitor as a new user. Any conversion during this visit won’t be associated with the user’s previous visits to the website and its sources. The same applies to Google Ads, Facebook Ads, as well as other advertising systems conversion tracking.

Therefore, conversion tracking is limited to transactions and other goal completions that occur within a week (or sometimes only same-day conversions). With a conversion window longer than 7 days, conversion tracking practically ceases to exist, not to mention the meaning of attribution modelling. 

The server-side tags bypass this limitation.

Server-side GTM Implementation

The server-side GTM implementation includes the following steps:

  • You have to create a new “Server” container in the Google Tag Manager;
  • Then you have to establish a server cloud on Google Cloud Platform (GCP). Automatic integration is recommended (GTM will prompt you to do so during the configuration);
  • Finally, you should register the GCP server under a subdomain of your website (e.g., so the communication with the GCP will be seen by the browser as 1st party data transfer by the website server.

Please note that credit card will be required for the GCP configuration as it is a paid service. There are some  free quota  and coupons for the new users on Google Cloud Platform, but you have to bear in mind that fees may apply at some point. As of today, GCP is the only environment you can use for server-side GTM (it should change in the future).

Useful links



Related posts