Free auditStart free
GlossaryGlossary · Measurement

Server-side tagging

Server-side tagging moves tag processing from the browser to a server container you control. How clients, tags and triggers fit, the data flow, and a check.

2 min
read
2
sources
Oct 31, 2026
updated
Scaplet Editorial Team
author
In one line

Server-side tagging runs your tags in a server container on infrastructure you control, instead of in the visitor's browser. The page sends events to your server, and the server's tags forward data to vendors such as Google Analytics.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

5 facts from the sources below
Server container
Container type
Web requests turned into events
Receives
Same tags, triggers, variables
Models
server_container_url
Web config option
Cloud Run, App Engine or your own
Hosting
01At a glance

The pieces, annotated

Piece

Server container

Job
Runs on a server you control. Until you forward data, only you can access it
Piece

Tagging server

Job
Receives web requests from devices and turns them into events
Piece

Client

Job
Adapter between an incoming request and the container; the first client in priority order that recognizes a request claims it
Piece

Trigger

Job
Checks each event against conditions and fires matching tags
Piece

Tag

Job
Sandboxed JavaScript that sends event data onward
Piece

Variable

Job
Works as in other container types
Point gtag.js at a server container
gtag('config', 'G-XXXXXXXXXX', {
  server_container_url: 'https://tags.example.com'
});

Server containers include Google Analytics and Measurement Protocol clients. The domain in the example is a placeholder.

02How it works

The data flow

  1. 1

    The site sends

    A page using gtag.js sends events to the URL set in server_container_url.

  2. 2

    A client claims

    The tagging server receives the request and a matching client claims it.

  3. 3

    Events run

    The client converts the request to events, which pass through triggers, tags and variables.

  4. 4

    Tags forward

    Matching tags send event data to destinations such as Google Analytics.

  5. 5

    A response returns

    The client packages a response for the sender.

Google's overview lists three goals: better page performance, finer privacy controls and better data quality. It does not quantify any of them, so measure your own before and after.

03Your call

Should you run one?

If this fits

It fits when

  • You want control over what leaves your infrastructure before it reaches vendors
  • You already operate cloud hosting and can monitor it
  • You can serve the container from a first-party domain
Or

Skip it when

  • A standard web container already does the job and no one owns a server
  • You expect it to replace consent choices: it does not change what you are allowed to collect
04How it works

Check it in 2 minutes

  1. 1

    Find the request

    Open DevTools, then the Network tab, and filter by your tagging server domain.

  2. 2

    Reload the page

    Confirm the page sends analytics requests to your domain.

  3. 3

    Use preview

    Open the server container's preview and confirm a client claims the request and the expected tags fire.

Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • google.com
  1. 01Server-side tagging overviewdevelopers.google.com · checked 2026-11-01
  2. 02Introduction to server-side taggingdevelopers.google.com · checked 2026-11-01
Questions

Asked a lot.

2 questions people ask next, answered from the sources on this page.

01Is server-side tagging the same as the Measurement Protocol?

No. Server-side tagging is a container that receives and routes events. The Measurement Protocol is an HTTP API for sending events; server containers include a client for it.

02Where can a tagging server run?

Google says you can run one on Google Cloud with Cloud Run or App Engine, or set one up manually on a platform of your choice.

Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly