Skip to content

Install the widget

Add the Kognit chat widget to any website with a single script tag.

2 min readUpdated August 2026
On this page

Watch: Test your website chat

18 seconds · Captioned workflow illustration, not a screen recording. No audio.

View the annotated workflow diagram
Test your website chat: 1. Open your storefront; 2. Send a test message; 3. Confirm both directions.
Numbered workflow illustration. Open the image for a full-size view.
Read the video transcript
  1. Open your storefront. Open the page where the chat widget is installed and locate the chat launcher.
  2. Send a test message. Open the widget and send a short question that your team can recognize as a test.
  3. Confirm both directions. Find the message in Inbox, send a reply, and confirm it appears in the website chat.

Get your snippet

Open Widget in the app. Your embed snippet is shown with your workspace's public key already filled in:

<script
  src="https://kognithq.com/widget.js"
  data-kognit-key="YOUR_PUBLIC_KEY"
  async
></script>

Paste it before the closing </body> tag on every page you want the widget on.

Platform instructions

Shopify

  1. Online Store → Themes → Edit code
  2. Open layout/theme.liquid
  3. Paste the snippet immediately before </body>
  4. Save

WordPress / WooCommerce

Either paste it into your theme's footer template, or use any "insert header and footer scripts" plugin and add it to the footer.

Webflow

Project settings → Custom code → Footer code, paste, and republish.

Next.js / React

Render the script in your root layout, or inject it once on mount. Load it async so it never blocks your page.

The public key is public

The key in the snippet identifies your workspace and is visible to anyone who views your page source. That is expected and safe — it grants nothing except the ability to start a chat with you.

It is not an API key and cannot read your tickets, contacts, or settings. See Widget security.

Verify the install

Load your site in a private window. The launcher should appear within a second or two. Send a message and confirm a ticket lands in Inbox.

If nothing appears, see Test the widget.

Performance

The script loads asynchronously and does not block rendering. The widget interface is only fetched when a visitor opens it, so pages where nobody chats pay almost nothing.

Was this page helpful?