As soon as the Nextsale JS SDK is being loaded in the page it registers the global JS variable called nsio. You can access this variable directly or as a property of the global window object (window.nsio)

nsio object has several public methods. For Promo Popup JS trigger functionality you need to use the public nsio.trigger() method. This method requires only single parameter and it's the ID of the campaign. You can get the ID of the campaign from the browsers address (url) bar after saving/publishing the campaign for the first time.

Basic implementation example:

var campaignId = 0; // YOUR CAMPAIGN ID

$('#button').on('click', function(){
// It's recommended to check the existence
// of the nsio object before using it
if (window.nsio) {
nsio.trigger(campaignId);
}
});

Note:

The feature is in beta phase. It may changed or removed in the future.

Did this answer your question?