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/.

circle-info

For EU region, use https://eu.alhena.ai for both the apiBaseUrl and the script src. See JavaScript API for full installation details.

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

Examples

Last updated