Skip to content

Embed Code

Add Webnav.ai to any website with a single <script> tag.

Basic Usage

html
<script src="https://widget.webnav.ai/widget/chat-widget.js" data-base-url="https://yoursite.com"></script>

Place this before the closing </body> tag. The chat bubble will appear in the bottom-right corner.

Prerequisite: AI model configuration

The chat bubble only appears after an AI model is configured for your account. Go to Dashboard → AI Model, choose a provider (OpenAI-compatible / Anthropic Claude / Google Gemini), and save your own API key. Without a verified model configuration the widget stays hidden on your site.

Full Example with All Attributes

html
<script
	src="https://widget.webnav.ai/widget/chat-widget.js"
	data-server="https://widget.webnav.ai"
	data-base-url="https://yoursite.com"
	data-theme="dark"
	data-lang="en"
	data-logo="https://yoursite.com/logo.png"
	data-mode="bubble"
	data-exclude="/admin,/login,/dashboard"></script>

Attribute Reference

AttributeDescriptionDefault
data-serverWebnav.ai server URLhttps://widget.webnav.ai
data-base-urlYour website URL (used for crawling)Current page origin
data-themeColor theme: light or darklight
data-langLanguage: zh, en, zht, jaAuto-detected
data-logoCustom logo URL for the widget headerWebnav.ai default logo
data-modeDisplay mode: bubblebubble
data-excludeComma-separated routes to skip

See Widget Attributes for the complete reference.

Self-Hosted Server

If you host Webnav.ai yourself, point data-server to your instance:

html
<script src="https://your-server.com/widget/chat-widget.js" data-server="https://your-server.com" data-base-url="https://yoursite.com"></script>

Webnav.ai — AI 智能客服