Prolonging the Lifetime of First-Party Cookies with Cookie Extender
The Cookie Extender functionality is designed to extend the lifetime of first-party cookies in browsers using the latest version of Intelligent Tracking Prevention (ITP) and was developed in response to changes introduced by Apple in iOS and MacOS in April 2023.
With ITP, Apple limits server-side cookies to a maximum duration of 7 days, even if they are classified as first-party. These restrictions apply when the cookies are set from an IP different from your website’s, directly affecting the efficiency of marketing campaigns and long-term tracking of user behavior.
How Does Cookie Extender Work?
Cookie Extender uses a “master cookie,” stored as a first-party cookie on your website, which retains each user’s unique ID. Each time a user visits the website, the master cookie is checked to identify the user’s unique ID.
Typically, since the Safari 16.4+ update, when an iPhone/iPad or Mac user revisits your website after 7 days, marketing cookies are no longer present in their browser. For instance, if someone clicks on an ad, but completes a purchase after 7 days, that conversion is no longer associated with the original campaign due to the cookie restrictions.
However, this is where the new Cookie Extender functionality comes into play. The master cookie remains intact, and when marketing cookies (such as Google Analytics, Google Ads, Facebook, TikTok) are missing or have been deleted, Cookie Extender restores these cookies using the information stored in the master cookie.
Even if the original cookies have been deleted, this restoration method ensures the continuous functionality of marketing cookies and allows accurate monitoring of user behavior on your website.
How to Configure Cookie Extender Using Tagual
The Cookie Extender functionality is available on any paid plan and can be activated from your Tagual account by following these steps:
-
The first step is to log into your Tagual application.
-
From the Dashboard, access your container by clicking the “View” button.
-
Click on Cookie extender.
-
Click on Enable Cookie Extender.
-
In this window you will see a list of standard cookies that are extended for all the paid plans users, cookies used by the most popular platforms like Google Analytics, Google Ads, Facebook or Tik Tok. If you need other cookies to be prolonged, besides the standard ones, listed in this window, you should upgrade to a higher plan.
The code generated on this page should be copied into your website, immediately after the <head> tag and before the code that loads Google Tag Manager, as indicated below.
If you are on the Growth or Premium plans, you can include various custom cookies to the standard list, that will also be extended. In the same window described in the previous section, you have the possibility to add a Cookie name and a Description and click on Save cookie.
How to Test if the Cookie Lifetime Has Been Extended
After a few weeks of implementation, review the visit data across different environments (Apple, Chrome, others). You should observe that the distribution of visitors present for more than 8 days on Safari is similar to that in other environments.
You can also follow the steps in the example below to quickly test the implementation of the Cookie extender.
-
Launch the Safari browser and access your website. Make sure that you are using version 16.4 or later of Safari.
-
Access Developer Tools by right clicking on an empty area of your store’s website and choosing “Inspect Element”.
-
Click on the “Storage” tab in the Developer Tools panel and, in the left panel of the Storage tab, select “Cookies” to view the cookies associated with your store.
-
Check that the _tg_visitor_id is present, which certifies that the cookie extender is active.
- In the cookies list, locate for example the ‘_ga’ cookie, (the user ID cookie set for GA4). Copy its value so you can compare it in the upcoming steps.
-
Delete the _ga cookie by selecting it and choosing “Delete” from the menu.
-
Refresh the page twice by clicking the “Refresh” button in your browser or by using the “Cmd+Option+R” keyboard shortcut.
-
After refreshing the page twice, find the _ga cookie in the list again and check that its value matches the one you saved earlier, at step no.5.
Conclusion
Cookie Extender is an innovative solution that helps keep first-party cookies active in the long term, even in the face of limitations imposed by the latest versions of ITP. This functionality allows you to protect your marketing campaigns, efficiently track conversions and maintain data continuity, ensuring the long-term success of your marketing strategies.
Configuring Cookie Extender through Tagual is essential to ensuring that your website remains competitive in the context of new user tracking regulations.