Cookie Expiration
Specify the number of days before the Optimizely Performance Edge visitor cookies will be set to expire.
Description
Specify the number of days before the Optimizely Performance Edge visitor cookies will be set to expire. You must call "setCookieExpiration" prior to loading the Optimizely Performance Edge snippet. The minimum number of days that can be set is 90 (approximately 3 months).
📘 Note
Some Optimizely Performance Edge cookies are reset every time a visitor comes to the site, which means the expiration period set with this API call is used each time the cookie is set. You can also use the API to enable or disable the extend cookie lifetime function.
window.optimizelyEdge.push(cookieExpiration);window.optimizelyEdge.push({
"type": "cookieExpiration",
"cookieExpirationDays": 365
});Parameters
This table provides general information about required and optional parameters.
Parameter | Type | Description |
|---|---|---|
cookieExpiration required | object | An object with the type field set to cookieExpiration. The other fields are the function arguments. |
cookieExpiration.type required | string | The argument indicating that you are using the cookieExpiration function. |
cookieExpiration.cookieExpirationDays optional | integer | The cookie expiration defined in days. |
📘 Note
This API is ignored when setting the optimizelyRedirectData cookie, used for forwarding redirect experiment info to the new page.