Stape/Knowledgebase

How to choose User Identifier type in Cookie Keeper?

Updated Mar 31, 2025

If you choose the Other platform option while configuring the Cookie Keeper power-up, you will see different options in the User Identifier type field: cookie, local storage, DOM element, JavaScript variable, and Stape User ID.

Different options in the User Identifier type field

All these elements are identifiers for the User ID that help restore the cookies of a specific user that was lost due to ITP browser restrictions.

We recommend using Cookie in this field as it is the most reliable method. Just make sure to create a cookie that complies with the requirements we describe below.

You also have alternatives such as Local Storage, DOM Elements, and JavaScript variables. However, Cookie is still preferred.

If you can’t set the user identifier to comply with the requirements in the next section, you can choose Stape User ID. In this case, cookies will be restored based on the user id that Stape generates.

You'll need a master cookie in place for Cookie Keeper to restore the user's cookies. The ideal approach is as follows:

  1. The cookie should be set from the server response, with the server's IP address differing by no more than the last two octets.
  2. On every page load, the server should set the cookie (let's call it 'user_id', for example) if it doesn't already exist: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie. The user_id should not be changed/updated if already present in the browser (just extend, it needs to be persistent.)
  3. The value of the cookie must be unique for each user. You can use e.g. IP address + timestamp as the cookie's value.
  4. Cookie duration: 400 days.
  5. Cookie domain: .your-domain.com
  6. HTTP only: false (do not set this parameter to true)
  7. Secure: true
Can’t find what you are looking for?