JS SDK
To seamlessly integrate Saturn into your website using the JavaScript SDK, follow these steps:
1. Add Integration
Embed the following snippet just before the closing </body> tag of your application to install the Saturn SDK:
<script>
var scriptElem = document.createElement("script"),
s = document.getElementsByTagName("script")[0];
var BASE_URL = "https://app.saturnhq.io";
scriptElem.src = BASE_URL + "/assets/sdk.js";
scriptElem.defer = true;
scriptElem.async = true;
s.parentNode.insertBefore(scriptElem, s);
scriptElem.onload = function () {
window.saturnSDK.run({
integrationId: <YourAppId>,
});
};
</script>After adding the above snippet to your website, you should see Saturn widget on the bottom right of your webpage if everything is installed properly.
2. Initializing Users
For logged in users, you need to initialize them in Saturn. Use the provided snippet below to achieve this:
Last updated