Skip to main content
You configure the homie embed in two ways: attributes on the <script> tag, or global config objects set on window before the script loads. At minimum, set chatbotId. Styling and behavior are managed from the homie platform and pulled in automatically.
See the Installation overview for platform-specific setup.

Script attributes

Set these directly on the <script> tag.

window.homieBotConfig

As an alternative to script attributes, set window.homieBotConfig before the embed script loads. This is useful when your CMS or tag manager makes it easier to set globals than attributes.
string
Your chatbot’s unique ID. Used if no chatbotId script attribute is present.
string
default:"https://chat.yourhomie.ai"
The chat host origin.
string
Store identifier forwarded to the chat.
'shopify' | null
Set to shopify to enable Shopify cart and market integration.
string
Force a language code, overriding automatic detection. Together with country, the language decides which market applies and in which language the assistant shows product texts.
string
The visitor’s ISO 3166-1 alpha-2 country code, for example DE or CH. The assistant uses it to select the catalog’s market with its prices, links, and assortment. Set it on every page to the country of the shop the visitor is in. Without country, the Default country under Knowledge sources → Products in the assistant applies, otherwise the catalog’s default market. In the conversation, the assistant can still look up products in another country when the visitor asks for it.
string
ISO 4217 currency code for tax-correct pricing.
boolean
default:"false"
Set to true to disable analytics and browser chat history and mark chats as playground chats.
{ title?: string; contextUrl?: string }
Set this object before the embed script loads to show the embedded chat instead of the floating widget. Use {} for the defaults. Add an empty element with the fixed, non-configurable ID homie-embedded-chat and set its height yourself; the chat fills it. No widget appears on this page. If the element is missing, the browser console shows a warning and neither the embedded chat nor the widget appears.For navigation without reloads, leave this setting unset and use mountEmbeddedChat() and unmountEmbeddedChat() instead. See Embedded Chat for complete setup and product-page examples.
Script attributes take priority over window.homieBotConfig.

window.homieUserConfig

Set window.homieUserConfig before the embed loads to forward an identity and arbitrary metadata to the chat iframe. This is an advanced option used to associate conversations with a known visitor.
string
A stable identifier for the current visitor.
string
A server-generated verification hash for the user_id.
Record<string, unknown>
Additional visitor information as key-value pairs.

Language resolution

The effective language is resolved from the first available signal:
1

Script attribute or config

A lang script attribute, otherwise homieBotConfig.lang.
2

HTML lang

The lang attribute on the page’s <html> element.
3

URL path

A locale segment in the current URL path.
4

Chatbot default

The chatbot’s configured default language. If the resolved locale is not in the chatbot’s active translations, the default is used.

Shopify market resolution

When platform is shopify, the embed forwards the visitor’s active market country and currency for tax-correct pricing. The value is resolved from:
1

Explicit override

A country / currency script attribute, otherwise homieBotConfig.country / homieBotConfig.currency.
2

Shopify storefront globals

Otherwise window.Shopify.country and window.Shopify.currency.active, which Liquid-theme Shopify shops expose.
Market detection from window.Shopify only applies when platform is set to shopify. On non-Shopify sites, only explicit country / currency values are forwarded.