Website SDK
The Alhena Website SDK lets you embed and customize the chat widget on your website. Use it to control widget behavior, respond to events, pass user data, and track e-commerce conversions.
Quick Start
Add the following snippet to your website's HTML:
<script>
document.gleenConfig = {
company: 'your-company-key',
apiBaseUrl: 'https://app.alhena.ai'
};
</script>
<script src="https://app.alhena.ai/sdk/gleenWidget.js"></script>Your company key is found in your dashboard URL after /dashboard/.
Reference
JavaScript API - Methods for controlling the widget (open, close, send messages, etc.)
Events - Subscribe to widget and conversation events
Styles API - Customize the widget's appearance
Custom Data - Pass user metadata for personalized AI interactions
A/B Testing - Run experiments with different widget configurations
E-commerce
Cart & Checkout Events - Track add-to-cart and purchase events
Revenue Attribution - Measure AI-driven conversions
Site Events - Send product views, add to cart and purchases from your own tags
Examples
Code Examples - Ready-to-use integration patterns
Internationalization - Multi-language support
Human Handoff Widget - Integrate with external helpdesks
Scroll-Triggered Widget - Show widget after user engagement
Last updated