Local Storage is a browser-based storage method that allows websites to save data on a user’s device, even after the page is refreshed or the browser is closed. This data is local (not sent to a server) and only accessible within the same domain — so ‘yourshop.com’ can’t read what’s saved on ‘anotherstore.com’. This makes Local Storage a useful tool for triggering widgets based on a visitor’s previous actions, preferences, or behavior patterns.
In display conditions On pages, you’ll find the Local storage key option. You can use it to check:
If a key exists at all — is set.
If a key has a specific value — equals.
If a key matches part of a value using conditions like starts with, contains one of, or ends with.
If a key’s value is numerical (greater than, less than).
If a value matches a regular expression (regex).
Common use case examples
Check if a key is set. Use this when you just need to know whether a key exists, regardless of its value. For example, you can show a discount to users who already completed a survey:
Key — quiz_completed
Condition — is set
Use numerical comparisons to trigger widgets based on how many times a user has done something. For example, display a special offer after a user has viewed products more than 3 times — a great way to target warm leads:
Key — productViews
Condition — greater than → 3
Check for specific values inside a key — helpful for category-based targeting. For instance, show a promo to users who browsed shoes or accessories:
Key — CategoryViewed
Condition — contains one of → shoes, accessories