Help / Add to Your Website

Add to Your Website

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

  1. In the Wix Editor, go to Settings → Custom Code (under Advanced).
  2. Click Add Code and paste your embed script.
  3. Set placement to Body - end.
  4. Choose to apply on All pages.
  5. Click Apply.

Squarespace

  1. Go to Settings → Advanced → Code Injection.
  2. Paste your embed script in the Footer section.
  3. Click Save.

Shopify

  1. Go to Online Store → Themes.
  2. Click Actions → Edit code on your active theme.
  3. Open theme.liquid under the Layout section.
  4. Paste the embed script just before the closing </body> tag.
  5. Click Save.

Webflow

  1. Go to Project Settings → Custom Code.
  2. Paste your embed script in the Footer Code section.
  3. 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 →