Skip to main content

Local storage in Merge tags

Use values from local storage to personalize your widget content

For example, you can show the product category a visitor is browsing. If someone is viewing a ring, your widget can offer 10% off the “Rings” category. This helps you show a more relevant offer because it matches what the visitor is already interested in.

Before you start

Make sure the value is already stored in local storage on your website. Claspo reads these values but does not create them.

Set up a merge tag from Local storage

1. Select a text element in your widget

2. Click Merge tag in the right panel

3. Choose Local storage

4. Enter the Local storage key

5. (Optional) Add an Example value for preview.

How it works:

  • The widget is shown only if the value exists

  • If the value is missing, the widget will not appear

Note

If the stored value contains multiple items, Claspo will display them as a single line of text. For example, if the value includes several categories like: Shoes, Accessories, Bags, the widget will show all of them.

Combine it with user data

You can use Local storage in Merge Tags not only to display product categories, but also for things like selected filters (colors, sizes, etc.) or any other useful data stored on your website.

Local storage helps you show what the visitor is interested in. You can also add who they are — for example, their name from cookies. Read the Cookies in Merge Tags article.

Did this answer your question?