Google Analytics GA4 Server Side Tagging with Google Tag Manager
Google Analytics GA4 Server Side Tagging with Google Tag Manager

Google Analytics GA4 Server Side Tagging with Google Tag Manager

Google Analytics GA4 can be configured with a Google Tag manager server. When you set up GTM server tagging, you will see GA4 client is already available by default. In this post, we will discuss the benefits and possibilities that GTM server-side tagging offers with details of how you can configure the GA4 tracking Tag in the container.

Table of Contents

Benefits of implementing GA4 server-side tracking

Bypass Adblocker

Hosting on your subdomain gives you the massive benefit of bypassing AdBlocker and Intelligent tracking preventions. A custom subdomain feature is not available in a free plan, for that you will have to update to paid plans.

AdBlock, a popular blocking extension, is reported to have more than 65 million users. Ad blocking is most common among internet users between 16 and 24 years old. Among this demographic, 46.2% of users worldwide admit to using ad blockers. Its means that a bit more than a quarter of paid ads will never reach their audiences. And this number is expected to grow by 2-3% annually.

Earlier it was adblockers that prevented the tracking of website data of visitors. But some browsers are using Intelligent tracking prevention technology, which is specifically designed to block 3rd party cookies in the browser. Firefox launched in 2019, and after that safari started using ITP in 2020.

Even if the website visitor agreed to the cookie policy but he is using an ad-blocking extension. In addition to blocking display ads, it will also block all the requests that are sent to Google Analytics. In such cases, GA does not receive any data from the web activity, and you won’t be able to see the visitor’s data and remarket them when they are browsing other websites.

Google Analytics GA4 server-side tracking

By utilizing server-side tagging you can create tagging URL within a custom subdomain that is located in the same hierarchy as your website domain, eg. In this case, collect requests will be sent not to, but to your This way, you will make GA request to the first party, and it would be blocked by ITPs and AdBlockers. -

Safari and Firefox are limiting the cookie lifetime to 7 days only, or in some cases to 24 hours only. It means that unless a user is revisiting your site every day and cookies are continuously updated, it will expire within a day/week. In that case, google analytics will consider all these visitors as new. You can check the latest updates on the browser.

Recently there is only one way to avoid this to run Google Analytics via Server-Side Google Tag manager. This feature is enabled by default, but we recommend checking it to 100% sure that cookie lifetime is set up to a more than an extended period.

Setting up Google Analytics GA4 in Google Tag Manager Server-side Container

  1. Create a Google Tag Manager Server-Side container if you haven’t created one.
  2. Make sure you’ve changed the tagging URL inside your Google Analytics variable within Google Tag Manager Web Container. Inside Google Tag Manager Web Container, go to Variables -> Choose your Google Analytics variable -> More Settings -> Advanced Configuration -> Past Transport URL. 

3. Setup GA4 tag inside GTM server container. Open “Tags” section inside Server-Side GTM Constiner and click “New”.

Name Your Tag, choose tag type “Universal Analytics.”

Create a trigger. Trigger type “Custom,” choose “Some Events.” Client Name equals Universal Analytics. 

You might not see the Client Name variable in the dropdown. In this case, open the Variables tab, click Configure, and enable all variables.

Click Save.



4. Open the preview mode if Google Tag manager severs container to verify it sends events to Google Analytics. You can see your standard events and custom events that you send via web GTM.


Now Your Google Analytics GA4 runs via a server container. If you have any questions or concerns please share them in the community box.

(Visited 214 times, 1 visits today)


  1. Pingback: Facebook Conversion Pixel for Google Tag Manager Server Side Tagging - Analytics Smart

  2. Pingback: GTM Server-side for Google Ads Conversion tracking (Adwords) - Analytics Smart

Leave a Reply

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