Configuration
Configure the widget with only the options that matter for a successful setup.
The init command accepts a configuration object. Start with minimal settings, then add options as needed.
Usage
window.LoopSmartAI.q.push([
"init",
{
agentId: "YOUR_AGENT_ID",
position: "bottom-left",
theme: "dark",
width: 400,
height: 600,
defaultLocale: "en",
userContext: {
id: "user-123",
email: "user@example.com",
},
},
]);Required option
| Option | Type | Description |
|---|---|---|
agentId | string | Your unique agent identifier |
Common options
| Option | Type | Description |
|---|---|---|
position | string | Widget position: bottom-right, bottom-left, top-right, top-left |
theme | string | light or dark |
width | number | Widget width in pixels |
height | number | Widget height in pixels |
offsetX | number | Horizontal spacing from screen edge |
offsetY | number | Vertical spacing from screen edge |
zIndex | number | Layer priority over your page |
defaultLocale | string | Fallback locale for language behavior |
productContext | object | Product data sent to chat |
userContext | object | User data sent to chat (id recommended, customerId legacy) |
Browser language
The widget can use browser language behavior with locale fallback. Keep defaultLocale set to your preferred default.
Keep it simple
For most teams, these are enough:
agentIdpositionthemeproductContextanduserContextwhen available
Continue to Product & User Context.