Identity

The CNAME and Durable Cookie Myth

A CNAME does not guarantee a durable cookie. Safari ITP, Shopify proxy guidance, and a simple lookup still leave an identity gap.

6 min read

Server-side tracking is a large umbrella term that can mean a lot of different things. What doesn’t happen often is an explanation of how different server-side solutions work. The differences can be significant and if you’re an ecommerce business owner or digital marketer, the differences can be substantive.

One of the narratives around server-side tracking is that a first-party cookie can provide a durable cookie i.e. a durable ID. The language around this topic often suggests that cookies of this type survive Safari’s Intelligent Tracking Prevention, or ITP, and allow for a cookie to be set for an indefinite expiry.

This conversation is often too simplistic. Without sufficient nuance or qualification, you might come away with the idea that a server-side Google Tag Manager setup along with a new CNAME record in your DNS will solve your broken cookie problems.

Unfortunately, that is just not how it works.

Watch the companion video
Why a CNAME and server-side Google Tag Manager do not guarantee a durable cookie. Watch on YouTube.

A CNAME does not guarantee a durable ID

Safari’s ITP generally places a seven-day cap on cookies set through JavaScript. That’s often contrasted to cookies set from the server, as though setting a cookie from the server automatically allows you to bypass ITP. However, only cookies set in very specific ways will bypass Safari ITP (for now).

Let’s look at a common set up. Suppose you create a subdomain in your DNS using a CNAME record that points to wherever you’re hosting your server-side GTM container. Requests go to that subdomain, and because it shares a common URL structure (site.com and subdomain.site.com), it can look like you’ve successfully made the tracking infrastructure first-party.

The assumption is that now the server-side cookie set by the tracking server will be durable because the endpoint uses a proxied subdomain. But the name alone isn’t all that you need.

Safari can look at where your DNS records resolve. If your storefront is on one network and your tracking subdomain resolves to a third-party endpoint on another network, it doesn’t prevent Safari from applying ITP restrictions to those cookies.

The CNAME record itself does not give you a durable ID. The infrastructure behind that record and your primary domain matters.

Figure 1: A CNAME does not guarantee a durable ID — Safari can see where the subdomain resolves

The infrastructure problem for Shopify stores

Trying to address that network mismatch takes you beyond adding a DNS record. One approach is to put a proxy in front of your Shopify store and have that same proxy route requests to your tracking container.

For example, something like Cloudflare would sit between the browser and your store, with requests routed through to Shopify or your container. Now you’re changing how traffic reaches the storefront.

The big problem with this if you’re on Shopify is that Shopify explicitly advises against putting a request proxy in front of the store. The recommendation is to let requests from the browser go directly to Shopify. A proxy can introduce crawler issues, checkout issues, latency, and other problems.

That’s significant. A setup presented as a simple way to get a durable cookie can end up requiring an infrastructure change that Shopify tells you not to make.

And it isn’t as easy as just setting up Cloudflare. Cookie mapping, request headers, and the tracking endpoint all have to be configured correctly. It can be brittle and you could break something without even knowing it.

Even a correctly configured setup doesn’t justify the promise of an indefinite cookie. The unsettling thing about ITP is that it is actively changing and evolving. What might be allowed today could be prohibited tomorrow.

Even a durable cookie leaves an architecture question

Let’s consider, theoretically, a Shopify store that is comfortable disregarding the proxy request recommendation. It uses a proxy, configures everything correctly at the endpoint, and has a data store that keeps track of users. Let’s assume there are no problems anywhere along that setup.

What happens next depends on the server.

In a simple setup, requests arrive at a container, and that container distributes data to marketing platforms. Maybe it’s your email service provider, Meta, or Google. Attached to the container is a basic memory store where a lookup happens: does the record from the browser match a record on the server?

If it matches, great. The server can attach some additional context, maybe an email address or phone number, before sending the event off to Meta. If it doesn’t match, that lookup gives the server nothing to work with for identity enrichment.

This is a router architecture. It routes data and uses a simple key-value lookup to add information when a matching record is available.

Figure 2: A simple router setup — events in, a key-value lookup, events out

The weakness of a shared browser ID

The problem of this type of architecture is that there has to be a shared state between the browser and the server. The browser carries a key, and the server has a record associated with that key. That’s the link.

If that key changes or gets removed, a system that depends on that lookup loses the connection. The server might still have the record, but it can no longer connect the incoming request to it.

In practice, user behavior is sporadic. People use different devices and different browsers. Someone who clicks an ad on Facebook or Instagram may be in a different browser from the one they use when they Google your store and click an ad there.

A memory store tied to a browser ID is a snapshot of the last known browser state. It has limited ability to make sense of those different contexts. So even if you’ve addressed cookie durability in one browser, you still have an identity problem in different contexts.

Figure 3: The weakness of a shared browser ID — only the browser carrying the key connects

What Kluvos does beyond the lookup

The architecture we use at Kluvos is fundamentally different from other systems out there today. You can read more about our architecture here.

If a cache lookup returns nothing, there are still more things we can do. We can examine the history and relationships behind the request and try to discover who this person is, even though the browser state appears to have changed.

That is a different kind of system from a container with a simple lookup table. The distinction matters because a durable cookie, even when you have one, only addresses part of the problem.

CNAME does not equate to a durable ID. And even if you’ve achieved the cookie behavior you intended, you still need to understand what your tracking system can do when that cookie no longer provides the link.

Start your 30-day free trial