Installing the Widget
Add the chat widget to your website with one line of code, then check that 'Install' says 'Installed and answering'. The same line works on every page and every site on your allowed list.
Each company has one widget. Its settings, knowledge and allowed websites apply everywhere the line is pasted.
Copy the code
- In the sidebar, open 'Communications', then 'Website chat'.
- Click 'Install'.
- Under 'Add this to your website', click 'Copy'. The button changes to 'Copied' for a moment.
The line looks like this, with your own key in place of the x's:
<script src="https://knowstack.ai/widget.js" data-key="wk_live_xxxxxxxxxxxxxxxxxxxxxxxx" async></script>
Paste it on your site
- Paste the line just before the closing body tag on every page where the chat should appear.
- If your site builder has a setting for code that runs on every page, paste it there once instead of page by page.
- Publish the site.
The line has the async attribute, so it loads without holding up the rest of your page. The chat runs in its own frame, so your site's styles don't change how it looks.
Check that it works
- Open a page of your site where you pasted the line.
- Look for the chat button in the corner you picked in 'Settings'. It sits bottom right unless you changed it.
- Back in KnowStack, open 'Install' and reload the page. The status box reads 'Installed and answering', with 'Last seen' and the time.
- If it still says 'Not detected yet', wait a minute and reload again. It can take a minute after you publish.
The first website that loads the line is added to 'Allowed websites' automatically, and from then on only listed sites work. If you test on a staging or preview address first, add your live domain to the list before you launch.
Built-in texts such as 'Where can we reach you?' follow the lang attribute of your page when it is English, Polish, Ukrainian, Russian, German or French. Once the AI recognises the visitor's language, they switch to it.
Hiding or removing the widget
To remove the chat for good, delete the line from your pages. 'Install' keeps showing 'Installed and answering' for 7 days after the chat last loaded on your site. After that it shows 'Not seen recently', with the date of the last load. To hide the chat for a while without editing your site, tick 'Pause the widget' in 'Settings' and click 'Save changes'. The line can stay on your pages while the widget is paused.