Loops AI

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

OptionTypeDescription
agentIdstringYour unique agent identifier

Common options

OptionTypeDescription
positionstringWidget position: bottom-right, bottom-left, top-right, top-left
themestringlight or dark
widthnumberWidget width in pixels
heightnumberWidget height in pixels
offsetXnumberHorizontal spacing from screen edge
offsetYnumberVertical spacing from screen edge
zIndexnumberLayer priority over your page
defaultLocalestringFallback locale for language behavior
productContextobjectProduct data sent to chat
userContextobjectUser 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:

  1. agentId
  2. position
  3. theme
  4. productContext and userContext when available

Continue to Product & User Context.

On this page