Basics
Installation
JavaScript SDK allows you manage the build and widget programmatically. To install javascript SDK on your website, copy the following HTML code snippet and paste it directly into your website's markup
<script src="https://js.ownly.store/{YOUR_COMPANY_ID}.js"></script>
Don't forget to replace YOUR_COMPANY_ID inside the snippet with your company Id available , which can be found in this section of our admin portal.
Example
<script src="https://js.ownly.store/O49dznDe.js"></script>
SDK
After the SDK file has loaded, and its content is done executing, a Ownly object is attached to the window. From there, you can directly interact with the SDK. We trigger an event named ownly.ready on the global document object when the SDK is ready. We recommend you encapsulate all your actions in the callback of that event.
document.addEventListener('ownly.ready', () => {
// You can safely use window.Ownly here
Ownly.api.build.add(...);
});