Back to all articles

Save your cookies while you can

Tobias Kräft
Tobias Kräft
Head of Data & Intelligence
5 min read
11 June 2021

Spearheaded by safari, browsers are increasingly limiting your ability to place cookies on clients visiting your website. As the focus has extended from third party cookies to first party cookies, this poses new threats to your ability to measure or target your clients in their customer journey and to rely on attribution metrics. 

There is no single solution to the potential end of the marketing cookie. But one of the most important (and easy) steps to take in the short term is to preserve as much of the cookie-dependent data you can. in this article we describe why, and how you can do that.

Challenges to understanding the customer journey

As a marketing manager, a key decision is: “how do i best spend my budget?”. in the past, tools such as google analytics were able to give a comprehensive view of the customer journey. By identifying returning visitors using cookies, google analytics was able to provide insights into which channel was contributing to conversions, a process referred to as attribution.

However, some browsers nowadays cap certain cookies to expire after 1 and 7 days. For instance, google analytics cookies are capped at 7 days, thereby causing your analytics tools to mistakenly view a return visitor as a new visitor if they do not visit your website within 7 days. This means that you lose your ability to understand how your advertising spend contributed to a conversion if the visitor does not return within 7 days of their last session before converting.

In the example below, a visitor arriving to the website through paid social on safari and returning 8 days later to convert via a direct channel would see no conversion credit given to the paid social channel under any attribution model.

In this context it is not possible for google analytics to provide fair, comparable and unbiased views of behaviour and channel performance beyond the 7 day return window and across browsers. This issue is exacerbated for websites which have a lengthy customer journey, where visit frequency is low. 

The solution – a cookie rewriting app

This is why we propose a solution: the cookie rewriting app. this piece of software allows you to extend the lifetime of selected cookies from your website to make sure they do not expire after only 7 days. This is possible because we place the cookie as if it was placed by your website instead of the advertising platform (aka rewriting). It is unexpected that browsers will start blocking such cookies because many websites rely on them heavily, for instance to track items in a basket. A prime candidate for the rewriting service is the google analytics cookie. With the ga cookie being rewritten, it once agains allows you to reliably build attribution analysis without being constrained by the need to differentiate between browsers. Furthermore, you regain your ability to view the full journey on all browsers and understand your channel performance. 

How does it work?

Browsers are blocking first-party cookies that are placed via java script, but not those that are written through http headers. Given this information, we host an application on an endpoint mapped to a subdomain of your website. The role of the application is to receive a payload with information about a javascript cookie in your visitor’s browser and to send a response with a header which overwrites the cookie as an http cookie. 

The process is as follows. When a user visits your website and a tracker such as google analytics places a java script cookie in the browser, we execute a callback function which sends the required payload to the application to get the response with the set-cookie header. 

The cookie is then rewritten with the new expiration date of your choosing, thereby bypassing the limitations of itp and other browsers limiting expiration.  


At a large ecommerce client, we saw that 30% of all return sessions in 2021 on safari 14 would have been treated as new users, and not linked to the original campaigns that brought their visit. Not using this service would have resulted in a 25% increase in safari 14 users and a 10% increase in overall site traffic in terms of users, whilst in reality not actually bringing new users, and attributing them to the wrong source.

It is clear that with such large portions of traffic being affected by the cookie extension, it is easy to miss-interpret how upper-funnel campaigns are performing. Furthermore, for attribution windows beyond 7 days, a mismatch can lead to underestimations of the value of your marketing efforts and spend. 

We are moving towards a (marketing) cookieless world. But until then, this solution will preserve your important analytics data.


More Insights?

View all Insights