This article is an addition to our main article about behavior-based personalization.

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

Ideas for cookie-based personalization: 

  • Logged-in users: Existing users need to be retained, not acquired. Change your website messaging accordingly. Inform logged-in users about new and improved features, swap out your salesy content for more in-depth explanations, and change your CTAs to move users further down the funnel.
  • Personalize based on page(s) viewed: The way a visitor navigates your website and the pages they visit, tell you a lot about their needs. You're a photographer and you present your works in an online portfolio? Set an "interest" cookie based on which pages of your portfolio someone viewed (e.g. "interested in wedding photography"). Next, highlight your experience as a wedding/event/conference/... photographer based on their interest.  
  • Personalize based on entry point: You have different landing pages that cater to different user personas? Set a cookie and take your personalization beyond the landing page. Xero is a good example: Their persona-specific landing pages attract organic and paid traffic. Clearly, a SaaS startup has different needs than a creative agency - with a cookie they can take their persona-specific messaging beyond the landing page. 

  You have targeted landing pages but once the visitor clicks through to your website, they land on a generic page? Set a cookie and personalize your website based on a visitor's initial landing page.  

Basic: How to create a cookie-based audience

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

1. How to personalize based on the existence of a cookie: 

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

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

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

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

Advanced: How to set a new cookie

By adding some custom Javascript, you can set up your own cookies. This way you can personalize based on landing page or pages viewed. Here are the two steps you need to take for this:

1. Add a cookie:

Use the advanced editor to add a cookie following this naming structure: Txt.setCookie(name, value, days)

In this example we set the cookie Txt.setCookie('solution', 'startup', 365);).

2. Define the cookie as a targeting condition

Now, use the cookie to define your target audience. Choose: behavior > cookie > is set > nameofyourcookie=value

For the "Startup" audience, we use the cookie as a targeting condition. Now, we can personalize for all visitors who initially arrived on the Startup landing page.

Did this answer your question?