Web Widget
Integration guide
Insert this where you want to see the widget:
<script name="wistory" src="https://lk.wistory.io/widget/widget.js?company=YOUR_COMPANY_TOKEN" async></script>
or you can init the widget manually:
<body>
<div id="widget-container"></div>
<script>
const companyToken = 'YOUR_COMPANY_TOKEN';
const container = document.getElementById('widget-container');
const script = document.createElement('script');
script.src = 'http://lk.wistory.io/widget/widget.js';
script.onload = () => {
new window.wistory.Wistory({
target: container,
props: {
company: companyToken
}
})
}
document.head.appendChild(script);
</script>
</body>
Props
Props | Options | Default | Description |
---|---|---|---|
titlePlacement | inbox, bottom | inbox | Position of titles in the list of stories |
variant | square, round | square | View of the list of preview stories |
token | string | - | If you need your own user token |
Target events
window.wistory.startEvent(eventId)
Start target event
window.wistory.stopEvent(eventId)
Stop target event