Cookie criterion
This article will show you how to use this Segment criterion.
The operators and tag check of this criterion were changed Early September 2025.
If you have any doubt about the actual behavior of your Segments, read carefully the specifications below.
Cookie criterion
The Cookie criterion is a segmentation criterion that enables defining a segment.
To learn how to create a segment, please refer to this article.
📖 Definition:
The Cookie criterion enables you to segment your audience based on the presence (or absence) of a specific cookie in the visitor’s browser.
🔎 How Does It Work?
In a campaign using the Cookie criterion, AB Tasty parses the Cookies storage to find the name of the cookie and its value:

⚙️ Configuration
You can select multiple operators for targeting a specific cookie and its value.
is
/is not
: will accept/reject the visitors if they have a cookie in their browser with a specific name and value (string).contains
/does not contain
: will accept/reject the visitors if they have a cookie in their browser with a specific name and a value containing a specific sequence of characters (string).is regular expression
/is not regular expression
: will accept/reject the visitors if they have a cookie in their browser with a specific name and a value verified by the regular expression.is lower than
: will accept the visitors if they have a cookie in their browser with a specific name and a numerical value strictly lower than the specified input.is higher than
: will accept the visitors if they have a cookie in their browser with a specific name and a numerical value strictly higher than the specified input.is between
: will accept the visitors if they have a cookie in their browser with a specific name and a numerical value strictly between the specified inputs.is declared
/is not declared
: will accept/reject the visitors if they have a cookie with the specified name in their browser or not.
If a cookie, specified in a condition using is not
, does not contain
, is not regular expression
operators, is not present in the visitors' browser, they will be rejected from the campaign.
Example :
You have a cookie name
Internal_Team
with valuetrue
used by your coworkersExternal Visitors do not have a cookie
Internal_Team
with valuefalse
stored in their browserIf you do a condition
Internal_Team
is not
true
, your coworkers will be rejected but so will be the visitors as the tag expects the specified cookie here.
⇒ In this case, you should exclude the visitors with the cookie without specifying the value and use is not declared
operator.
You can also add another condition by clicking +Add condition
below the criterion field. This action adds a condition line into the same section and allows you to add another cookie condition to your targeting.
In this case, you will have to choose which relation between your multiple conditions to apply for your targeting between some
and all
. Each time a new value is expected, you need to add a new condition (even if it is based on the same cookie).

💡 Use case
The standard use case consists in creating an audience segment based on the presence of a CRM cookie. Let’s say you want to create a “VIP” segment in AB Tasty to create personalized messages for this visitor category on your website.
Your CRM pushes a cookie called RFM_segment
for all web users, with different values:
user_0
for a prospect;user_1
for a one-time buyer;user_2
for a returning buyer;user_3
for a very frequent buyer.

In the AB Tasty segment builder, go to the Technology category and drag and drop the cookie criterion into the segment creation section on the right side.
Then select the is
option and enter the user_3
value, without double quotes.
Need additional information?
Submit your request at [email protected]
Always happy to help!

Last updated
Was this helpful?