Skip to main content

Using Cookie values for widget display rules

Learn how to use Cookie values to control when, how often, and to whom your widget appears

M
Written by Maryna Hura
Updated this week

Use cookies to control widget visibility based on stored browser data. In Claspo, this lets you personalize the experience using information like user activity, preferences, or visit history.

Important!

  • Cookies must belong to your domain — Claspo can only access cookies set by your website.

  • HttpOnly cookies can’t be used — these are inaccessible to JavaScript and therefore not available for widget targeting.

You can check:

  • If a cookie exists (is set).

  • If its value meets certain conditions (equals, starts/ends with, contains one of, greater/less than, or regex)

Use case examples

1. The user came from a partner site and we want to show them a widget with an exclusive coupon or a special welcome message. Cookie example: referral = partner123. The condition in Claspo:

  • Name — referral

  • Condition — equals → partner123

2. Target based on interest categories. If you store category history in a cookie, you can trigger widgets to promote a relevant offer or accessory bundle. Claspo’s condition example:

  • Name — lastViewedCategory

  • Condition — contains one of → laptops, smartphones, headphones

You can also exclude users who have already redeemed a promotion to prevent showing the same discount to someone who’s already used it. Exclusion condition:

  • Name — hasDiscount

  • Condition — equals → true

3. Follow up on video/demo engagement. If the user watched a product video or demo, follow up with a lead capture widget, offering a downloadable PDF or ‘Talk to an expert’ form. Claspo’s condition example:

  • Name — videoWatched

  • Condition — equals → true

Did this answer your question?