Extend advertising cookie lifetime

In Works with · Updated

Ad platforms keep click IDs and visitor IDs in first-party cookies on your domain. If one of those cookies has expired, a later conversion from that visitor can no longer be tied to the ad that brought them in. The ClickPatrol tag can refresh selected advertising cookies and set them to a longer lifetime. The setting is optional. Every provider is off by default.

How the refresh works#

On every page where the ClickPatrol tag runs, it searches for cookies from the providers you selected. When it finds a cookie, it writes that cookie again, with the same value and the lifetime from the table below. That lifetime counts from the visitor's most recent page view. It does not count from the first visit.

The tag refreshes only cookies that already exist. It never creates a cookie for a provider whose own tag did not set one.

Providers and lifetimes#

ProviderCookiesLifetime
Stapestape400 days
Google Analytics_ga400 days
Google Ads_gcl_au, _gcl_aw, _gcl_gb, _gcl_ag, _gcl_gs90 days
Meta_fbp, _fbc90 days
TikTok_ttp / ttclid400 days / 30 days
Affiliatesawin_*, rakuten_*, outbrain_cid, taboola_cid, cje365 to 400 days
Snapchat_scclid / _scid90 days / 400 days
LinkedInli_fat_id90 days
Microsoft Adsuet_vid, _uetmsclkid90 days
Pinterest_epik90 days
Google DV360_gcl_dc90 days

Snapchat is supported only in the ClickPatrol tag, for this setting and for the Snapchat click ID in conversion tracking. There is no Snapchat integration in the ClickPatrol dashboard yet.

When this helps#

Most providers set these cookies with a default lifetime of their own, and some refresh them on each visit. The ClickPatrol setting adds the most when a cookie would otherwise run out sooner, for example when a provider's tag does not run on every page, or when the time between click and purchase is long.

It does not help in every browser. Safari limits cookies written by JavaScript to about 7 days. Firefox can limit them too, depending on its privacy settings. In those browsers, the refreshed cookie still expires early. The extension is reliable on Chrome and Edge.

Turning it on#

Google Tag Manager#

  1. Open your ClickPatrol tag.
  2. Expand Cookie lifetime extension (optional).
  3. Tick only the providers you actually use on your site.
  4. Save the tag, then publish the container.

WordPress plugin#

In the ClickPatrol WordPress plugin, the same provider list is under Settings, ClickPatrol, Cookie lifetime extension. See WordPress plugin.

A cookie your consent banner never allowed is not created by ClickPatrol, because the tag only refreshes cookies that already exist. A cookie that does exist does live longer. For every provider you tick, update the lifetimes in your cookie notice or consent tool, so what you tell visitors matches what their browser stores.

Limits to know#

  • JavaScript only. HttpOnly cookies and cookies set by a server cannot be read or written from the browser. They are not on the list.
  • Browser caps stay in place. Safari still shortens the refreshed cookies, and Firefox does too in some settings, as described above.
  • Server-side for every browser. For lifetimes that hold in every browser, your own server has to set the cookies, for example through a server-side GTM container. This setting does not do that.

Was this article helpful?

Let us know so we can improve our documentation

Thanks for your feedback!

Need Help?

If something isn't working or you have questions, our support team is here to help you.

Contact Support