02 Research / preprint

arXiv ·

SST-Guard: Detecting and Characterizing Server-Side Google Analytics in the Wild

Muhammad Jazlan, Alexander Gamero-Garrido, Zubair Shafiq, and Yash Vekaria

A browser-based system that detects server-side Google Analytics by matching the values it leaves in the browser, not the endpoints or names it uses.

6,314
of the Tranco top-150K websites use server-side Google Analytics (4.2%)
95.0%
of ground-truth sites where SST-Guard finds the exact endpoint
99.8%
accuracy of the network request classifier
38
value templates across requests, cookies and window variables
166
sites where EasyPrivacy blocked no server-side GA request

Abstract

As web browsers increasingly restrict client-side tracking, the web tracking ecosystem is shifting from client-side to server-side tracking (SST). In SST, the browser sends tracking requests to an intermediate endpoint, which then forwards them to the tracker's endpoint, eliminating direct client-to-tracker requests. As a result, existing tracking protections that block requests to known tracker endpoints are rendered ineffective. In this paper, we investigate server-side implementation of Google Analytics, the most widely deployed third-party tracking service on the web today. We also present SST-Guard, a multi-modal, browser-based system for detecting and blocking server-side Google Analytics (sGA). Our key insight is that even when the tracker's endpoints change, sGA must necessarily still collect and share the same semantic information as client-side Google Analytics (e.g., identifiers, event metadata). Therefore, rather than detecting requests to known Google Analytics endpoints, SST-Guard aims to detect underlying artifacts of collection and sharing of these semantic values to any arbitrary endpoint. Operationalizing this insight is challenging because real-world sGA deployments commonly customize endpoints and obfuscate URLs/payloads. SST-Guard addresses this challenge using a value-template approach that employs regular expressions to match semantic value patterns across multiple modalities: network requests, cookies, and the window object. We validate SST-Guard on Tranco top-10k websites, detecting 4.02% (403) sGA domains with over 93% accuracy across three modalities, with network request classifier demonstrating the highest accuracy (99.8%). By deploying SST-Guard in the wild, we find 4.21% (6,314) of Tranco top-150k websites using sGA.

The problem

In client-side tracking, a script on the page reports data straight from the browser to the tracker's endpoint. Browsers and filter lists defend against this by blocking requests to known tracker endpoints.

Server-side tracking (SST) separates collection from reporting. The data is still collected in the browser, but the browser sends it to an endpoint controlled by the publisher or an intermediary, which forwards it to the tracker from the server. The direct browser-to-tracker request that defenses look for is gone.

Detecting SST is hard for three reasons:

  1. Publishers can route tracking data through intermediaries that are not known tracking endpoints.
  2. The requests can use publisher-specific paths and non-standard parameter names.
  3. The requests can be encoded or obfuscated to defeat simple rule-based blocking.

We study the server-side implementation of Google Analytics (sGA), the most widely deployed third-party tracking service on the web.

Value templates

When a publisher deploys sGA, the endpoint and the parameter names may change, but the implementation still has to collect and send the same information as client-side Google Analytics, such as identifiers and event metadata. The values keep their format even when their names change.

SST-Guard uses value templates: regular expressions that match the values of Google Analytics artifacts, whatever name they are stored under. For example, the client ID parameter cid takes values such as 1834020512.1731024000 or GA1.2.1834020512.1731024000, which generalize to:

(?:GA\d+\.\d+\.)?\d{8,10}\.17\d{8,11}

Templates are applied across three modalities:

Modality Templates Example of what is matched
Network requests 23 Google tag IDs and client IDs in query parameters
Cookies 5 _ga-style cookie values, under any cookie name
Window variables 10 The contents of dataLayer, under any variable name

Using several modalities makes detection robust. If a publisher encodes network requests and hashes cookie values but leaves the window variables set by Google's script unchanged, sGA is still detected through the window.

Training without server-side labels

SST-Guard learns entirely from client-side Google Analytics. We crawl the Tranco top-10K with an instrumented Chrome, accept consent banners, scroll, click and follow a same-site link, and record network requests, cookies and window variables. Sites that send requests to known Google Analytics endpoints provide the labels.

Each artifact becomes a binary vector of template matches, and one classifier is trained per modality, with combined and meta ensembles over all three. Ground truth for evaluation comes from Google's Tag Assistant extension.

Despite never being trained on sGA requests, SST-Guard detects them with 98.25% precision and 97.52% recall.

Comparison with prior work

Recall is measured on a fresh crawl containing 479 sGA websites.

Approach Finds the sGA endpoint on
Moti et al. (matches known parameter names) 24.2%
Mertens et al. (finds tags configured with a server-side GTM URL) 51.8%
SST-Guard, request classifier 95.0%
SST-Guard, all three modalities 99.4%

Server-side GA in the wild

Deployed on the Tranco top-150K, SST-Guard detects sGA on 6,314 websites.

  • Where it is hosted. 81.59% of these sites route sGA through a distinct subdomain; the other 18.4% use a path on the first-party site.
  • CNAME cloaking is the minority. Among subdomain deployments, only 26.49% use CNAME cloaking. The remaining 73.51% use direct A/AAAA records, and 82.70% of those subdomains are hosted on infrastructure different from the publisher's main website.
  • Customization is common. 28.06% of sites use non-standard paths such as /ag/g/c, and 25.58% heavily customize their sGA requests. We observe 260 variations of the dataLayer variable name.
  • Encoding. 223 websites base64-encode the query parameters of their sGA requests. SST-Guard detects 216 (96.9%) of them through cookies and window variables, even though the request classifier alone detects only 7.

Filter lists

We applied EasyPrivacy to the 40,199 sGA requests we identified. It blocks 93.50% of them, but that coverage depends on a few rules that assume the default /g/collect path and unmodified GA4 parameters. Customized and encoded deployments evade these rules, leaving 166 websites with no sGA request blocked.

We reported our findings to the maintainers of EasyPrivacy, who added the most common sGA subdomain names and paths to the list. Those rules flow into extensions such as uBlock Origin.

Limitations

  • Semantic similarity. Detection relies on server-side GA producing the same values as client-side GA. If Google restructured sGA so the values no longer resembled client-side patterns, the templates would stop matching, though such a change would also break existing GA4 integrations.
  • Ground truth. Tag Assistant only captures implementations that use Google's gtag library, so our prevalence numbers are a lower bound.
  • Other trackers. The approach does not yet generalize to other server-side trackers. Meta, TikTok, Snapchat and Reddit offer no debugging tool equivalent to Tag Assistant, and deployments where the identifying values never reach the browser cannot be detected this way.

Cite

@article{jazlan2026sst,
  title = {SST-Guard: Detecting and Characterizing Server-Side Google Analytics in the Wild},
  author = {Jazlan, Muhammad and Gamero-Garrido, Alexander and Shafiq, Zubair and Vekaria, Yash},
  journal = {arXiv preprint arXiv:2604.27497},
  year = {2026}
}

← all publications