Configure Custom Properties for notifications

Clement Aigreault Updated by Clement Aigreault

What are custom properties?

Custom properties help you refine your targeting by sharing additional details about your visitors with Wisepops.

How to set up custom properties on your store

Take the script you used when you set up your website. It should look like this:

<script>
(function(w,i,s,p){a=document.createElement("script");a.src=w+"/embed?website_id="+i;a.onload=function(){wisp.start(w,i,s,p);};document.head.appendChild(a);})("https://app.getwisp.co", "WEBSITE_ID");
</script>

Add a new parameter at the end of the script to provide the properties

<script>
(function(w,i,s,p){a=document.createElement("script");a.src=w+"/embed?website_id="+i;a.onload=function(){wisp.start(w,i,s,p);};document.head.appendChild(a);}) ("https://app.getwisp.co", "WEBSITE_ID", { custom: { property1: 'value', property2: 1 } });
</script>

Dynamically update Wisepops

If an event happens before the page reloads and you need to update Wisepops, you can call the updateContext function. When calling this function, Wisepops will try to get other notifications.

Example:

window.wisp.updateContext({ custom: { property1: 'new value' } });

Use your custom properties

Now that you are providing the custom properties you can use them in the Audience step of your campaigns.

Your properties can be a text or a number.

Contact