👉 Cookie criterion

The Cookie criterion is a segmentation criterion that enables you to create a segment

📖 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.

⚙️ Configuration

You can also base yourself on the value of this cookie and therefore verify both its presence and its value.


You can experiment with the presence of the cookie (use the is operator) or its absence (is not operator).

You can also add another condition by clicking Add condition below the criteria 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 operators to perform 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.

n the AB Tasty segment builder, go to the Browsing behavior category and drag and drop the cookie criterion into the segment creation section on the right-hand side.
Then select the has the cookie option and enter the user_3 value, without double quotes.

🚩 Heads up

The cookie value field functions like a “regex” operator: you can enter a specific character string (such as “user 3”) or a part of it (“3”). However, if another user category bears the “user_33” cookie, the latter will also be included in the segment. 

For more precise targeting, particularly if you want to target a more complex cookie value (beginning with a specific sequence or matching a given structure), you can use a regex, directly in the same field.

🔎 How Does It Work?

In a campaign using the Cookie criterion, AB Tasty parses the cookie storage to find the right value declared in the campaign configuration. To find the right value, please refer to the "name" of the cookie for the tag. 


Need additional information?

Submit your request at product.feedback@abtasty.com

Always happy to help! 


Was this article helpful?