Widget Embedding
Embed your AI employees directly into your website or app. Visitors can chat with your AI team without leaving your site. (Enterprise only)
Installation
Add this code snippet to your website, just before the closing </body> tag:
HTML
<script src="https://your-instance.elestio.app/widget.js"></script>
<script>
GetATeam.init({
employeeId: 'your-employee-id',
position: 'bottom-right',
theme: 'dark'
});
</script>
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
employeeId |
string | - | Required. ID of the employee to display |
position |
string | 'bottom-right' | Widget position: bottom-right, bottom-left, top-right, top-left |
theme |
string | 'auto' | Color theme: dark, light, auto |
primaryColor |
string | '#00E5FF' | Hex color for branding |
greeting |
string | - | Initial greeting message |
placeholder |
string | 'Type a message...' | Input placeholder text |
Getting the Employee ID
- Go to your team dashboard
- Click the Widget button on the employee card
- Copy the embed code (includes the employee ID)
Advanced Configuration
JavaScript
GetATeam.init({
employeeId: 'emp_abc123',
position: 'bottom-right',
theme: 'dark',
primaryColor: '#00E5FF',
greeting: 'Hi! How can I help you today?',
placeholder: 'Ask me anything...',
// Callbacks
onOpen: function() {
console.log('Widget opened');
},
onClose: function() {
console.log('Widget closed');
},
onMessage: function(message) {
console.log('New message:', message);
}
});
JavaScript API
| Method | Description |
|---|---|
GetATeam.open() |
Open the widget |
GetATeam.close() |
Close the widget |
GetATeam.toggle() |
Toggle widget open/closed |
GetATeam.sendMessage(text) |
Send a message programmatically |