Airgentic Help
Configure the Airgentic script tag to control how the chat widget behaves on your website.
Add the Airgentic script tag to your website pages, typically just before the closing </body> tag:
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
defer></script>
Replace YOUR_ACCOUNT_ID and YOUR_SERVICE_ID with your actual values (available from your Airgentic administrator).
All options are added as data-* attributes on the script tag.
| Attribute | Description |
|---|---|
data-account-id |
Your Airgentic account identifier |
data-service-id |
The service identifier for this website |
| Attribute | Description | Default |
|---|---|---|
data-chat-icon-visible |
Show or hide the floating chat icon. Set to "true" or "false". Overrides the service-level setting in the admin console. |
Uses service config |
data-chat-icon-button-id |
Element ID or class name of a button (or other clickable element) that opens the hover widget when clicked. Same effect as clicking the floating chat icon. If an element with that ID exists it is used; otherwise all elements with that class name are used. | — |
data-airgentic-question-target-url |
URL to redirect visitors when they submit a question via an AI question input field. See AI Question Input Fields. | Opens hover widget |
data-search-input-id |
Element ID or class name of an existing search input to bind Airgentic Search to | — |
data-search-button-id |
Element ID or class name of an existing search button to bind Airgentic Search to | — |
Control whether the floating chat icon appears on the page. This is useful when you want different behaviour on different pages of your website.
<!-- Always show the chat icon on this page -->
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
data-chat-icon-visible="true"
defer></script>
<!-- Hide the chat icon on this page (e.g., when using Service Hub only) -->
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
data-chat-icon-visible="false"
defer></script>
Priority order:
1. Page-level data-chat-icon-visible attribute (if set)
2. Service-level setting in the admin console
3. Default: chat icon is shown
Use your own button or link to open the hover widget. When the element is clicked, the chat opens just as if the visitor had clicked the floating chat icon. Useful when you want a "Chat with us" or "Ask AI" button in your header, footer, or inline content.
ID or class: The attribute value is first treated as an element ID. If no element with that ID is found, it is treated as a class name and all elements with that class are bound (so multiple buttons can open the widget). Use the ID or class value only — no # or . prefix.
If the element already has a click handler (e.g. a link), Airgentic’s handler runs and prevents the default action so the widget opens instead of navigating.
<!-- By ID -->
<button id="open-chat-icon">Chat with us</button>
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
data-chat-icon-button-id="open-chat-icon"
defer></script>
<!-- By class (e.g. when your site uses dynamic IDs) -->
<div class="livechat_button">Live Chat</div>
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
data-chat-icon-button-id="livechat_button"
defer></script>
The hover widget must be enabled for your service; this option has no effect if you use Service Hub only without the floating chat.
Redirect visitors to a dedicated AI support page when they submit a question via an AI Question Input Field.
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
data-airgentic-question-target-url="/ai-support"
defer></script>
The question is passed in the URL and submitted automatically on the target page. If not set, the hover widget opens on the current page to answer the question.
Connect Airgentic's Search UI to your existing search elements. When a visitor uses your site's search box, Airgentic intercepts the query and displays AI-powered search results.
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
data-search-input-id="searchInput"
data-search-button-id="searchButton"
defer></script>
Notes:
- Use element IDs only (no # prefix) or class names (no . prefix)
- You can provide either input ID or button ID; Airgentic will bind to whichever you provide
- Providing both gives the best user experience
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Your Page</title>
</head>
<body>
<header>
<input type="text" id="siteSearch" placeholder="Search..." />
<button id="searchBtn">Search</button>
</header>
<main>
<h1>Welcome</h1>
<p>Your page content here.</p>
</main>
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
data-chat-icon-visible="true"
data-search-input-id="siteSearch"
data-search-button-id="searchBtn"
defer></script>
</body>
</html>