Cookie filter
The Cookie filter matches visitors by the value of a cookie set on your site. Use it to target audiences that another tool already marks with a cookie, such as a loyalty app, a consent banner, a chosen language or a partner referral.
Available on: all platforms.
How it's evaluated
The filter reads: Visitor has a cookie [name] whose value [operator] [value].
Personizely reads the cookie with that exact name on the current page and compares its value with yours. A cookie that doesn't exist counts as an empty value.
Campaigns read the cookie when they run on page load. Widgets with a Target rule read it again when their trigger fires, so a cookie set on the same page, for example by a consent banner, is picked up.
Options
Option | What it does | Values / default |
|---|---|---|
Cookie name | Exact name of the cookie | Required, case-sensitive |
Operator | How to compare | is, is not, contains, does not contain, is empty, is not empty, is higher than, is lower than. Default is |
Value | What to compare with | Required, except for is empty and is not empty |
Behavior details
- Missing cookies are empty. If the cookie doesn't exist, is empty, is not and does not contain match. Use is not empty to require that the cookie exists.
- Comparisons are exact and case-sensitive. No wildcards or regular expressions.
- The value is compared as stored. Cookie values aren't decoded first, so a value saved as summer%20sale must be entered that way, not as summer sale.
- Number comparisons read the first number in the value. "is higher than 100" works with values like 150 or tier_150. A value without a number counts as 0.
- HttpOnly cookies aren't visible. Cookies your server marks as HttpOnly can't be read by the filter. Ask the tool that sets them for a readable cookie, or expose the value with website data.
- Cookies from other domains. Only cookies available on the page the visitor is viewing can be read. A cookie set for shop.example.com isn't available on example.com, unless it was set for the whole domain.
- Duplicate names. If two cookies share a name (for example, set on different paths), the one listed last by the browser is used.
Examples
- Loyalty members: "Visitor has a cookie loyalty_tier whose value is gold" to show members-only pricing messaging.
- Wait for consent: "Visitor has a cookie cookie_consent whose value contains marketing" as the Target rule of an email popup.
- Partner traffic: "Visitor has a cookie ref_partner whose value is not empty" to personalize a landing page for affiliate visitors.