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.
chatbotId
string
Your chatbot’s unique ID. Used if no chatbotId script attribute is present.
domain
string
default:"https://chat.yourhomie.ai"
The chat host origin.
storeId
string
Store identifier forwarded to the chat.
platform
'shopify' | null
Set to shopify to enable Shopify cart and market integration.
lang
string
Force a language code, overriding automatic detection.
country
string
ISO 3166-1 alpha-2 country code for tax-correct pricing.
currency
string
ISO 4217 currency code for tax-correct pricing.
Script attributes take priority over window.homieBotConfig. The embed also writes the resolved values back into window.homieBotConfig after it loads.

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.
user_id
string
A stable identifier for the current visitor.
user_hash
string
A server-generated verification hash for the user_id.
user_metadata
Record<string, unknown>
Arbitrary key-value data. The embed Base64-encodes it before forwarding it to the iframe.

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.