Cherry Seed

What is a first-party subdomain in server-side tracking?

first-party-subdomain server-side-tracking custom-domain ad-blocker-bypass safari-itp

Quick Answer

A first-party subdomain routes tracking requests through your own domain so browsers and ad blockers treat them as first-party traffic, and Safari ITP does not cap cookies set from it (Dataslayer, 2026). Instead of sending events to googletagmanager.com, a subdomain like data.yourstore.com points to your server-side container. Because the request never leaves your domain, ad blockers that filter third-party tracking domains let it through. Cookies set via HTTP headers from your own subdomain get full expiry windows rather than the 7-day ITP cap applied to JavaScript-set cookies.

Full Answer

The distinction matters because of how browsers decide what to block. Safari ITP, Firefox Enhanced Tracking Protection and most ad blocker filter lists target known third-party tracking domains. When your GA4 or Meta events route through googletagmanager.com or connect.facebook.net, they hit those lists. A first-party subdomain sidesteps the filter because the browser sees a request to your own domain — the same origin as the page the visitor is on.

The cookie benefit is equally important. Safari ITP caps cookies set by JavaScript at 7 days, which breaks attribution for any visitor who returns after a week. But cookies set by an HTTP response header from your own subdomain are classified as first-party server-set cookies, and ITP does not apply the 7-day limit to them. That means click identifiers like gclid stored in a first-party server-set cookie survive longer attribution windows.

Setting it up means adding a DNS record — typically a CNAME — that points your chosen subdomain to whatever server-side infrastructure handles your events. The server receives the tracking request on your domain, processes it, and forwards events to GA4, Google Ads, Meta or BigQuery. For a deeper look at the data these setups recover, see [912 million ad blockers are hiding a third of your WooCommerce traffic](https://seresa.io/blog/data-loss/912-million-ad-blockers-are-hiding-a-third-of-your-woocommerce-traffic).

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/1086

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/server-side-tracking/what-is-a-first-party-subdomain-in-server-side-tracking