The cookie criterion enables you to segment your audience based on the presence (or absence) of a specific cookie in the visitor’s browser.
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 (using the “Include” operator) or its absence (using the “Exclude” operator).
You can also add conditions by clicking “Add Value”.
This action adds a condition line into the same section. The operator between these 2 conditions is AND, which means users will have to match both conditions at once to be included in the segment.
The standard use case consists of 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 prospect, “user_1” for one-time buyer , “user_2” for returning buyer “user_3” for very frequent buyer).
In 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.
The “cookie value” field functions like a “regex” operator: this means you can enter a specific character string (such as “user 3” without double quotes) or a part of it (“3” will also work).
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.
For more on regexes, please refer to our article dedicated to this topic.