HTML
Install on your website

Add Asks to any website with HTML

Paste the Asks embed script right before the closing body tag on every page. It loads the AI chat widget asynchronously on any site you can edit.

Learn more about the Asks AI chatbot for websites →

Updated

To add the Asks AI chat widget to a website you control, paste one <script> tag right before the closing </body> tag on every page, then publish. The script loads asynchronously, so your page never waits for it, and it shows the chat launcher in the corner. On a site builder, follow its own guide instead: WordPress, Wix, Squarespace, Webflow, or Framer.

Add the snippet

Copy your snippet

Open Channels → Chat widget → Deploy. Under Choose how to install, keep Code snippet and HTML. Under Configure your code snippet, select For website visitors without logins, unless customers sign in to your site (see Logged-in customers). Then select Copy. Your snippet already contains your widget key:

HTML
<script
  src="https://cdn.asks.app/embed.js"
  data-widget-key="YOUR_WIDGET_KEY"
  async
></script>

The widget key is public by design: it identifies your widget and grants no access to your account.

Onboarding Put it on your site step with the Embed Code card showing the script tag and a Copy button, and the Installation status card watching for your site above the Email instructions to a developer button
The same snippet appears in onboarding's last step and on the Deploy tab.
Paste it before the closing body tag

Paste the snippet immediately before </body>. If your site has a shared layout, footer partial, or include file, paste it there once so every page gets it. Otherwise paste it into each HTML file. Keep the async attribute.

Publish and open your site

Upload or deploy the changed files, then open your site in a new tab. The launcher appears in the bottom corner within a few seconds.

Verify it works

On the Deploy tab, the Installation status card switches from "Watching for your site" to "Widget detected on" followed by your domain on the first page load that runs the snippet. Send a test message from your site: it appears in your Inbox, and the agent replies when it's on for the Chat widget at AI agent → Deploy.

Chat widget Deploy tab scrolled to the Installation status card, which reads Widget detected on aurelia-skincare.com in green, between the server-side userHash code and the Identity verification (for users with logins) card
Installation status turns green on the first page load with the snippet.
Deploy AI Agent page with the AI Agent Status card active and the Deploy to Channels card listing Chat widget switched on and Active, then WhatsApp Business, Instagram, Facebook Messenger, and Telegram with their own switches
The agent answers on your site when Chat widget is on here.

Logged-in customers

If customers sign in to your site, choose For users with logins before you copy. Your server renders the signed-in user's data-user-id and a data-user-hash (an HMAC-SHA256 of the id with your identity secret) on the script tag, and those customers keep their conversation history on every device. The server code for Node.js, Ruby, Python, PHP, Go, and Java is on the Deploy tab; the full setup is in the developer guide under Logged-in users.

More from the same snippet

  • Single-page apps — choose Single-page app under Code snippet and load the script once in your app shell. See React & Next.js.
  • Inline chat — add data-container-id to render the chat inside a section of a page, such as a contact page. See Inline embed.
  • Your own buttons — any element with the data-asks-open attribute opens the widget when clicked.

Troubleshooting

The launcher doesn't appear

  • The snippet is in the head. The widget attaches to the page body, so a script that runs before the body exists logs [asks-widget] Failed to initialize widget in the browser console. Move it right before </body>.
  • The widget isn't live. Check that Channels → Chat widget reads Live, and that Spotlight isn't the live website channel instead.
  • A Content-Security-Policy blocks it. Allow the origins listed in the developer guide's Content-Security-Policy table.
  • The key is wrong. The widget's config request returns 404 Widget not found. Copy the snippet again from the Deploy tab.

The chat says "This chat isn't live yet"

Your workspace has no active plan or trial, so nobody can answer yet. Start one from Plans & billing.

The widget shows, but nobody replies

Turn on AI Agent Status and the Chat widget switch at AI agent → Deploy. With the agent off, messages still reach your Inbox for your team to answer.

Chat on WhatsApp