Skip to main content

Install the widgets

Each widget is one line of code from Tools, plus a placeholder div for the ones that sit inside a page. Copy the exact code for your project from Tools > (tool) > Setup with Copy code.

WidgetCodeWhere
Ask AI<div data-ai-search></div> + widget.jsThe page and spot where the search box should appear
Site Search<div data-site-search></div> + site-search.jsYour site's search page, where results should appear
Chatbotchatbot.js onlyEvery page, best just before the closing body tag in the shared template

All widget files load from https://widget.sorchy.com/ with async, so they do not slow down your page. Before going live, add every domain that will carry the code to Settings > Security > Allowed domains.

Drupal

  • Ask AI and Site Search: create a custom block (or a field on a page) with a text format that allows script tags and data- attributes, such as Full HTML, paste the code and place the block where the widget should show.

  • Chatbot: add the code to your theme's html.html.twig before the closing body tag, or attach it as a library in your theme so it loads on every page.

  • If your text formats strip script tags, keep the div in the content and load the widget file through the theme instead.

WordPress

  • Ask AI and Site Search: add a Custom HTML block to the page and paste the code.

  • Chatbot: add the code to every page through your theme's footer or a header-and-footer code plugin.

Google Tag Manager

  • Chatbot: create a Custom HTML tag with the code and fire it on All Pages.

  • Ask AI and Site Search: the div must already be in the page, so add it in your site's template. GTM can then load the widget file on those pages.

Check your installation

  1. Open the page in a private window and confirm the widget appears.

  2. Ask a question and check that the answer cites your pages.

  3. Look for the conversation in Conversations under the right channel (Ask AI, Site Search or Chatbot).