Openli
IntroductionGetting StartedTechnical DocumentationGet help
  • Getting started
    • Introduction
    • Dictionary
    • FAQ
      • IAB TCF v2.0
  • Privacy hub
    • How to create your privacy profile
    • How can I get an Openli Privacy Badge?
    • Vendor owners
    • Why are custom properties on vendors super valuable?
    • Setting up custom properties
  • Tasks
  • Cookie Consent Management
    • Quickstart
    • Checklist: Cookies
    • Cookie widget
      • Create a cookie policy
      • Create a cookie widget
      • Install the widget
      • Manually add any cookies
      • Customise your widget
      • How to get color codes
      • Set the widget language
      • Use custom link/button instead of Cookie Shield
      • Add company name to cookie pop-up
    • Categorise your cookies
    • Adding information to cookies
    • Adding information to your cookie providers
    • Blocking Cookies with Openli
    • Cookie expiration dates and lifespan
      • Changing expiration on Google Analytics cookies
  • Policy and agreement management
    • Generate your privacy policy
    • Changing an old cookie policy to a new on autopilot
    • Embed your policies and legal agreements
      • Embedding agreements without displaying a widget
    • Install the Privacy Badge
  • General Openli guides
    • Setting up SSO (Single Sign-On)
      • SSO with Azure AD (Microsoft)
      • SSO with Google
      • SSO with Okta
      • How to log in with SSO
    • Add a website to your Openli account
    • Using projects to handle multiple languages
    • Collect consents without storing IP addresses or user-agents
  • Technical documentation
    • Widget
      • Collect cookie consent
        • Blocking cookies
        • Blocking embedded media
        • Cookie-widget options
        • Consent state API
    • API
      • Services
        • Personal data
        • Subprocessors
    • Cookies set by Openli
  • System Specific Integration Guides
    • Cloudflare
  • Legacy integrations
    • Google Consent Mode
    • Google Tag Manager
      • Block cookies with GTM
      • Install Openli with GTM
      • Prevent triggers from firing in GTM
    • HubSpot
    • Pardot
    • Shopify
      • Install cookie widget
      • Integrate consent with checkout
    • Square Online
    • Squarespace
    • Webflow
    • Wix
Powered by GitBook
On this page
  • Why is it important to keep track of my cookies' expiration dates?
  • So how do I change the lifespan of a cookie?
  1. Cookie Consent Management

Cookie expiration dates and lifespan

PreviousBlocking Cookies with OpenliNextChanging expiration on Google Analytics cookies

Last updated 3 years ago

Did you know that cookies have a lifespan, and that there are laws determining how long a cookie's life span is allowed to be?

Well, in that case here is a short rundown of the wheres and whats of cookie lifespans.

Cookies are, as you might know, small files stored on your computer when browsing the internet, designed to track your behaviour, choices, system info etc.

They do so for a predefined amount of time, before they expire. meaning that they stop tracking you. Many are simple session cookies that expire when the browsing session ends, but some can have lifespans that are much longer, which can mean, that the use of the cookie on your website could be non compliant.

Why is it important to keep track of my cookies' expiration dates?

The short answer is, that to be compliant requires cookies to be active for a maximum of 365 days. Then you would need to collect new consent to make sure you are still allowed to collect the data. The big challenge with cookie lifespan is that many common cookie providers ignore this and in some cases we find cookies set to a life span of two, five or in some cases even ten years (effectively setting them "forever" as most users will change most of their devices at least once every decade). Unfortunately, as a website owner, it is your responsibility that you do not have any cookies with lifespans exceeding one year.

So how do I change the lifespan of a cookie?

This depends on the cookie and the script that sets the cookie. Unfortunately this varies immensely from cookie to cookie so we can't tell you how to do it on all cookies. We can however help you our with one of the most common ones. We currently have a guide for :

Google Analytics