Techdocs
Nosto
Search…
Introduction
Implementing Nosto
Implement on your website
Implement on native mobile
Implement on a physical store
Checking your setup
APIs
GraphQL
REST
Frontend
JS API
Initializing Nosto
Recommendations
Popups
Listing Popup Campaigns
Opening a Popup
Enabling & Disabling Popups
Popup Callbacks
Common Examples
3rd party data integrations
3rd party data integrations
Visit Nosto
Issues
Magento
Magento 2
Shopware
Shopify
Prestashop
BigCommerce
PHP-SDK
Salesforce
Powered By
GitBook
Enabling & Disabling Popups
You can use the JS API to conditionally enable or disable a popup.
Enabling a Popup
The following snippet enabled the specified popup.
1
nostojs
(
function
(
api
)
{
2
api
.
enablePopup
(
"popupCampaignId"
);
3
});
Copied!
Parameters
Field
Type
Required
Default
Reason
id
String
✔
​
The identifier of the popup campaign
Disabling a Popup
The following snippet disables the specified popup.
1
nostojs
(
function
(
api
)
{
2
api
.
disablePopup
(
"popupCampaignId"
);
3
});
Copied!
Parameters
Field
Type
Required
Default
Reason
id
String
✔
​
The identifier of the popup campaign
Previous
Opening a Popup
Next
Popup Callbacks
Last modified
2yr ago
Copy link
Contents
Enabling a Popup
Parameters
Disabling a Popup
Parameters