The Shopalyst Buy it Now [BIN] widget is a simple to use plug and play library to enable rich shoppable experiences on your website. The BIN widget offers a rich API to customise the widget to fit your website and branding to create seamless and beautiful integration into your existing website.
To get the BIN widget on your website, drop a note to our team and we will get back to you.
To get started, you will need the following information which should have been provided to you by the Shopalyst team. (If you don't have this information, please Raise a Request)
publisherId: The unique publisher handle
placementId: The unique placement identifier
campaignId: The unique campaign identifier
Once you have this information, you are ready to setup your page. Enter the details below to see the integration guide:
Initialization
<!-- Initialize Shopalyst properties in the _shopalyst namespace before including the cartmgr script -->
<script>
var _shopalyst = {
pub: 'andrelon', // The publisher ID
pl: 1800, // The placement ID
cm: 1800, // The Campaign ID
consent: false // A boolean indicating whether the user has consented to our use of cookies
};
</script>
<!-- Include Shopalyst cart manager script for the desired region -->
<script src="https://ncc-nl.shortlyst.com/js/cartmgr.min.js"></script>
<!-- If the Shopalyst parameters were not initialized before adding the script, the initialisation -->
<!-- can be done using the `_shopalyst.init()` method after the script has loaded-->
<script>
_shopalyst.init('andrelon', // The publisher ID
1800, // The placement ID
1800, // The Campaign ID
false // A boolean indicating whether the user has consented to our use of cookies
)
</script>
Invoking Widgets
<!-- Invoke the widget by passing an ean code and other options -->
<script>
// Setup product page configuration
var pdpConfig = {};
_shopalyst.openSlPdp('8712561406017','ean', pdpConfig);
// To open the PDP widget on the click of a button, invoke it in the click handler of the desired element
button.addEventListener('click',function(){
_shopalyst.openSlPdp('8712561406017','ean', pdpConfig);
});
</script>