This is your widget snippet.
Copy-paste it into the code of the pages you want to chat on.
Right before the </head>
tag is the best option.
<script>
(function(c,r,m,f,d,e,v){c[d]=c[d]||{},e=r.createElement(m),v=r.getElementsByTagName(m)[0],e.async=1,e.src=f,v.parentNode.insertBefore(e,v)})
(window,document,'script','https://warranty-service.netlify.app/c4d-warranty-SDK.js','C4DWarranty');
C4DWarranty.config = {
host: 'https://crm.example.tld', // URL to connect API
baseUrl: '/api/v1',
widget: {
enabled: true,
button: {
enabled: true,
caption: 'гарантия',
size: 80,
fontSize: 8,
}
}
}
</script>
<div c4d-warranty></div>
<a href="c4dWarranty">Show Widget</a>
<button onclick="C4DWarranty.showWidget()">Show Widget</button>