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.
| Widget | Code | Where |
|---|---|---|
| Ask AI | <div data-ai-search></div> + widget.js | The page and spot where the search box should appear |
| Site Search | <div data-site-search></div> + site-search.js | Your site's search page, where results should appear |
| Chatbot | chatbot.js only | Every 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.twigbefore 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
divin 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
divmust 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
Open the page in a private window and confirm the widget appears.
Ask a question and check that the answer cites your pages.
Look for the conversation in Conversations under the right channel (Ask AI, Site Search or Chatbot).