title: Script Tag Reference description: Every data attribute you can set on the Navigic embed script tag. order: 2

Script Tag Reference

Configure the widget by adding data-* attributes to the script tag.

Basic Example

<script
  src="https://releases.navigic.ai/embed/embed.js?v=7"
  data-api-key="pk_wk_YOUR_KEY"
  data-display-mode="bubble"
  data-color="#2563eb"
  async
></script>

Attributes

AttributeTypeDefaultDescription
data-api-keystring(required)Your publishable embed key. Starts with pk_wk_.
data-workspacestringAlias for data-api-key. If both are set, data-workspace takes priority.
data-display-mode"bubble" | "panel" | "inline""bubble"How the widget renders. See Display Modes.
data-position"bottom-right" | "bottom-left""bottom-right"Bubble position. Only applies in bubble mode.
data-colorCSS color"#2563eb"Primary color for the bubble, header, and send button.
data-titlestring"Chat with us"Header title text.
data-greetingstring"Hi! How can I help you today?"First message shown when the chat opens.
data-panel-side"left" | "right""right"Which edge the panel slides from. Only applies in panel mode.
data-panel-widthCSS value"400px"Panel width. Only applies in panel mode.
data-target-elementCSS selectorContainer element for inline mode. Required when data-display-mode="inline".
data-mode"live" | "mock""live"Use "mock" for testing without a live agent. Returns canned responses.
data-gateway-urlURL"https://navigic.ai/dashboard/runtime"Runtime gateway endpoint. You shouldn't need to change this.
data-manual"true"Disable auto-init. You must call NavigicWidget.init() yourself. See JavaScript API.
data-user-idstringAuto-identify a user on load. Use with data-user-hash for secure verification.
data-user-hashstringHMAC-SHA256 hash for Identity Verification.

Display Mode Examples

Bubble (default)

<script
  src="https://releases.navigic.ai/embed/embed.js?v=7"
  data-api-key="pk_wk_YOUR_KEY"
  data-position="bottom-right"
  data-color="#3e6d53"
  async
></script>

Panel

<script
  src="https://releases.navigic.ai/embed/embed.js?v=7"
  data-api-key="pk_wk_YOUR_KEY"
  data-display-mode="panel"
  data-panel-side="right"
  data-panel-width="450px"
  async
></script>

Inline

<div id="navigic-chat" style="height: 600px;"></div>
 
<script
  src="https://releases.navigic.ai/embed/embed.js?v=7"
  data-api-key="pk_wk_YOUR_KEY"
  data-display-mode="inline"
  data-target-element="#navigic-chat"
  async
></script>