Get your embed code
Go to your bot's page in the AnsrNow dashboard and find the Embed Code section. You'll see a script tag like this:
<script src="https://app.ansrnow.com/widget/YOUR_BOT_TOKEN.js" async></script>
Copy this code and add it to your website using the instructions for your platform below.
WordPress
There are several ways to add the widget to WordPress:
- Theme footer (recommended) — Go to Appearance → Theme File Editor, open
footer.php, and paste the script tag just before the closing </body> tag.
- Plugin — Install a plugin like "Insert Headers and Footers" or "WPCode". Go to the plugin settings, paste the script in the footer section, and save.
- Custom HTML block — If you want the widget on specific pages only, add a Custom HTML block in the page editor and paste the script tag.
Tip: Adding the script to the footer ensures it loads on every page of your site without affecting page speed.
Wix
- In the Wix Editor, go to Settings → Custom Code (under Advanced).
- Click Add Code and paste your embed script.
- Set placement to Body - end.
- Choose to apply on All pages.
- Click Apply.
Squarespace
- Go to Settings → Advanced → Code Injection.
- Paste your embed script in the Footer section.
- Click Save.
Shopify
- Go to Online Store → Themes.
- Click Actions → Edit code on your active theme.
- Open
theme.liquid under the Layout section.
- Paste the embed script just before the closing
</body> tag.
- Click Save.
Webflow
- Go to Project Settings → Custom Code.
- Paste your embed script in the Footer Code section.
- Click Save Changes and publish your site.
Any other website (HTML)
For any website where you have access to the HTML, paste the script tag before the closing </body> tag:
<html>
<body>
<!-- your page content -->
<script src="https://app.ansrnow.com/widget/YOUR_BOT_TOKEN.js" async></script>
</body>
</html>
Verify it's working
After adding the code, visit your website in a browser. You should see a blue chat button in the bottom-right corner. Click it to open the widget and test with a question.
Not seeing the widget? Clear your browser cache, check the browser console for errors, and make sure the script tag is placed correctly. If using a caching plugin (e.g., on WordPress), purge the cache.
Next: Learn about knowledge sources →