Cookie Targeting – Running Experiments for Specific Audiences

Learn how cookie targeting restricts an experiment to visitors carrying particular cookie values.

2 min read


Cookie targeting restricts an experiment to visitors whose browser carries a cookie value you nominate. It is how you test against a segment your own site already knows about — logged-in customers, a loyalty tier, a market, or a group you have deliberately flagged for QA.

On the experiment’s Settings tab, drag the cookie condition into the Target Area. A dialog opens with a text box: enter one cookie value per line.

Saving replaces the entire set rather than adding to it. The dialog opens pre-filled with the values already configured, so edit the list in place — deleting a line and saving removes that value.

Each value appears as its own chip in the Target Area afterwards, and can be removed individually.

What it is good for

  • Segment tests. If your site sets a cookie identifying customer type, you can run a change for returning customers only and leave new visitors untouched.
  • Internal QA. Set a cookie on your own browsers and target the experiment at that value. The test is then live in production and invisible to real visitors, which is a far better rehearsal than a staging environment that differs from production.
  • Staged rollouts. Restrict a change to a cohort your own systems mark, and widen the cookie set as confidence grows.

Things to get right

  • The cookie must already exist. Pertento matches values that are present; it does not set cookies for you. Your site or tag manager has to put them there.
  • Values must match exactly. A trailing space or a differing case is a different value. Surrounding whitespace on each line is trimmed when you save, but nothing else is normalised.
  • Cookies vanish. Visitors clear them, and browsers expire them. A visitor who loses the cookie stops matching, and if that happens mid-experiment they leave the test.
  • Do not put personal data in a targeting value. Use an opaque flag or tier identifier rather than an email address or customer name.

Effect on results

A cookie-targeted experiment measures the effect within that segment, which is usually the point, but it is not a statement about your traffic as a whole. A win among logged-in customers does not license rolling the change out to everyone.

The segment is also smaller than your total traffic, so expect the test to need longer. Check the power analysis on the Statistics tab.

Notes

  • Cookie rules combine with URL and device rules; a visitor must satisfy all configured rules.
  • Cookie targeting is not carried over when you duplicate an experiment. Set it again on the copy.
  • Saving the dialog replaces every previously configured value.