The MarineSnow JavaScript SDK
The script you embed in your website is the MarineSnow JavaScript SDK. Its primary jobs are to track user sessions and load the AI widgets onto the page.
Overview
The script is lightweight and loads asynchronously to ensure it does not impact your website's performance.
Programmatic Interaction
You can interact with the widgets programmatically. For example, you can create a custom button on your website that opens the AI Chat widget when clicked.
// Example: Open chat widget from a custom button
document.getElementById('my-custom-chat-button').addEventListener('click', function() {
if (window.MarineSnow) {
window.MarineSnow.open('chat');
}
});