Einstein monotile background

Article

Walkthrough: Using Cookies for audience segmentation

Learn how to segment visitors based on their cookies to personalize for logged-in users, affiliate traffic, on-site actions, and more.

my image Some great alternative text

Do you want to optimize for logged-in users? Maybe you identify affiliate traffic using cookies. Or maybe you fire cookies when a visitor performs certain actions. In this guide, you will learn how to segment visitors based on existing cookies and how to set up your own cookies to create behavior-based audiences.

Note: this article is an addition to our main article about behavior-based audiences.

What are cookies?

A cookie is a small piece of data sent from a website and stored on the user's computer by the web browser. Cookies help your website remember information (e.g. items added to shopping cart, information entered in a form field,...) or record the user's browsing activity (e.g. clicking a button).

Prerequisite for using cookies

For security and performance reasons, your website doesn't send cookies to Unless by default. So, to create an audience based on a cookie, you need to whitelist the cookie you want to send us in your account settings. Also, bear in mind that the browser cookie can’t be set to httpOnly since we won’t be able to read the cookie or send it to our servers.

How to use existing cookies

Generally, you have two options - target based on the existence of a cookie or the value of a cookie.

How to personalize based on the existence of a cookie

When setting up your target audience, choose: behavior > cookie > is set > nameofyourcookie

audience-cookie-loggedin

Here, we target users for whom the cookie "isLoggedIn" is set.

How to personalize based on the value of a cookie

If you want to display a variation based on a specific value of a cookie, you'll have to enter both, the name of the cookie and its value → nameofyourcookie=value

audience-cookie-customerplan

Here, we target users for whom the cookie "customerPlan" has the value "basic"

my image Some great alternative text

Friendly support from real people

We’re here to help

We are known for our quick responses if you have an issue. Feel free to ask us anything. But you can also ask our conversational AI a question, of course!