This documentation explains how to use the Liveshop Web SDK - Widget.
The Liveshop Web SDK - Widget Script Tag should be added near the top of the tag and before any other script or CSS tags.
Once your tag is inserted, you'll be able to call anytime the global function openStreamShopLive("PUT_YOUR_LIVE_URL_HERE")
. It will open your live in a modal. (This command openStreamShopLive
is a promise
, and it's resolved when the live is closed by the user)
<script>
var liveshopSdkWidgetOptions = {
// This code above is just an example. Replace it with your store information :)
live: 'https://streamshop.liveshop.com.br/streamshopdemo/loja',
bg: 'https://images.crunchbase.com/image/upload/c_pad,f_auto,q_auto:eco,dpr_1/mzolsyhormiy7fvz6dgp'
};
// Core Script (do not touch)
(function (i, s, o, g, r, a, m) {
var p = new Promise(function(rs){return rs();});
a = s.createElement(o);
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
a.onload = function(){return p.then(function(){return ss_widget_btn(liveshopSdkWidgetOptions);});};
m.parentNode.insertBefore(a, m);
})(window, document, 'script', 'https://assets.streamshop.com.br/sdk/liveshop-sdk-widget-btn.min.js');
</script>
liveshopSdkWidgetOptions
will customize set up your widget. It is an JavaScript Object and can be full filled with params. Go to next page to see all optional and required params.