Allow special strictly necessary cookies
How to allow special strictly necessary cookies?
According to GDPR, strictly necessary cookies could be set in case they are required for the website to work properly. Also, not all cookies are considered private data, for example, a cookie to store visitor setting on the website, language, or cart can be set without user consent.
Usually, such cookies are stored in the Cookies section under the Strictly necessary category. However, some cookie names are generated using random symbols and do not have fixed names.
For example, some systems session cookies do not have a certain name, instead, cookie names are generated randomly, like a hash value, ex: 3c70b445f566758848ec319708ce2e05
(32 symbols of alphanumeric characters).
For that, we have implemented regular expression match functionality, which means you can use a regular expression for cookie name and Cookie-Script will also not delete any cookies that match the regular expression.
Strictly necessary cookie name regular expression patterns can be entered in Behavior > Strictly necessary cookies. You can enter several cookies separated by comma:
cart, /^[a-f0-9]{32}$/i, language
In this example, 3 cookies are considered strictly necessary and will not be deleted by CookieScript:
cookie named cart
cookie with any name that has 32 symbols of 0-9 and a-f (hash-like value)
cookie named language
You can use this regular expression to keep hash-like cookie names: /^[a-f0-9]{32}$/i
For other types of randomly generated cookie names, you can build your own regular expressions.
Note: Regular expression has to start with a "/" symbol
Note: Cookies listed in this section will not be shown in the cookie declaration table. If you need to list them in your cookie declaration table, you can simply add them to the Strictly Necessary category manually in any user-friendly format.
If you have cookies with a simple random patters, you can also enter them directly in the cookie declaration (does not support regular expressions).
Did this answer your question?