Skip to Content
AuraAura Docs

Setting Up the Widget

Enable the widget and add it to your site.

The widget lives on the Widget tab of your companion's profile editor. Everything you need to go live is on that one screen, and every change saves as you make it - there is no Save button to press.

Enable the widget

Open your companion's profile, go to the Widget tab, and turn on Enable widget. This is what the runtime checks before it will render anything on your site - leave it off and the widget stays invisible even if the script tag is installed.

Check the live preview

The widget in the corner of the tab is the real thing: your companion's avatar and name above the same chat bar visitors see on the companion page, aura and all. Visitors can type or tap Talk right there, and the small expand button beside the name opens the full conversation.

Copy the embed snippet

Under Embed code, use Copy and paste the snippet into your site's HTML just before the closing </body> tag, on every page that should show your companion:

<script
  src="{host}/widget/aura-widget.v1.js"
  data-aura-assistant="{assistantId}"
  async
></script>

The data-aura-assistant attribute is what ties the script to your specific companion - each companion gets its own snippet. The widget starts in the bottom-right corner, and visitors can drag it anywhere.

Restrict it to your websites (optional)

Open Restrict to your websites, type a website and press Enter, comma, space, or Tab to add it. Leave the list empty to let any site show the widget.

Anyone can copy a snippet from a page's source. Listing your websites keeps it from being placed anywhere else. Only the hostname matters; https://www.example.com/ becomes example.com. A site and its www. form count as one. A subdomain such as app.example.com is a different site and needs its own entry, and ports are not matched, so a site on a non-standard port (like localhost:3000) cannot be allowed while the list is in use. The list controls where the widget may be placed; it does not make the companion itself private, so keep its sharing setting in mind.

Changes reach your live site within about a minute - the runtime config is cached for 60 seconds.

How it loads

The script tag is static and identical for every companion - it doesn't carry any per-companion data itself. When it runs on a visitor's page, it fetches your companion's live configuration (enabled state, allowed websites, name, and avatar) from Aura, then builds the launcher and chat panel from that. If your companion is disabled, or the visiting page's domain isn't on your allowed list, the widget simply doesn't render - there's no broken UI left behind.

Colors, greeting text and the launcher's styling are fixed to Aura's brand defaults and aren't something you set here. Visitors can always start by talking or by typing, so there is nothing to choose for that on this Widget tab.

Last updated on

On this page