Server-side cookies
Nov 19, 2026
Definition
Server-side cookies are cookies set by your own web server instead of by a script running in the visitor's browser. Because they come from your server and your domain, browsers treat them as more trustworthy and let them last longer.
Why it matters
Browsers have spent years restricting cookies. Safari's Intelligent Tracking Prevention (ITP) limits cookies set by JavaScript to as little as seven days, and in some cases 24 hours. Other browsers and ad blockers apply similar rules.
For personalization, this is a real problem. A customer who visits on Monday and returns ten days later looks like a brand new visitor. Their browsing history, their identification and their place in your audiences disappear. You lose the ability to recognize returning customers, and every report undercounts how many of your visitors come back.
Server-side cookies solve much of this, because the cookie is set by your server in a way browsers do not restrict in the same way.
How it works
With standard client-side tracking, a script loads from the tracking vendor's domain and sets cookies through JavaScript. With server-side cookies, tracking requests pass through your own domain first.
The usual setup has three steps:
- Set up a proxy on your own domain, for example
yourdomain.com/tb, that forwards tracking requests to the vendor. - Update the tracking script so it loads from your domain instead of the vendor's.
- Turn on server-side cookies in the tracking tool, so cookies are set by your server.
Only the tracking tool's own cookies and a short list of headers pass through the proxy. Your site's login and session cookies stay on your side.
How you use it in Triggerbee
Triggerbee supports server-side cookies on your primary website domain and its subdomains. You set up a proxy on your domain (Triggerbee has guides for common setups, including PHP), point the tracking code to it, and switch on Use server-side cookies under Account settings > Web Tracking.
A few things to know before you switch:
- Moving from client-side to server-side cookies is safe. Existing visitors carry over the next time they load a page.
- Switching back is not possible without losing data, so treat it as a one way change.
- The Triggerbee Google Tag Manager template does not work with server-side cookies. Add the tracking code in a Custom HTML tag or in your source code.
- If your site uses page caching, exclude the proxy path from it.
Example
An outdoor retailer has a large share of Safari traffic on mobile. Before the switch, most of those visitors looked new every week, so returning visitor campaigns barely reached anyone. After moving to server-side cookies, the same visitors are recognized across weeks, and campaigns aimed at returning customers reach the people they were built for.