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://notifications.wisepops.com", "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://notifications.wisepops.com", "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 update function. When calling this function, Wisepops will try to get other notifications.

Example:

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

For Shopify user

On Shopify you can't edit the setup code, so if you want to inject custom properties you will need to use the update function.

You can create a liquid file as described in the popup article and instead of using the wisepops function do:

<script>
window.wisp.update({ custom: {
available: {{ variant.available | json }},
sku: {{ variant.sku | json }}
} });
</script>

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.

Notifications targeting guide

Contact