Install the widget
One script tag puts the widget on your site. Your widget type, look and collections come with it, and so does the AI Assistant when it is on.
Before you start
Section titled “Before you start”- A collection with documents in it.
- Your site under Security → Allowed domains. The widget searches only on the sites listed there;
a page on
localhostworks without being listed. See Widget allowed domains. - On WordPress or WooCommerce, the plugin installs the widget for you, so you can skip this page.
-
Copy the snippet. Open Install → Installation and copy the Install snippet under Add the script to your site. It carries your project’s Read only key.

Install → Installation If the page shows No Read only key, click Create API key first.
-
Paste it before
</body>on every page that should have search. That is usually your theme template, your layout file or a site builder’s footer code.<script src="https://search.typemo.com/loader.js?k=YOUR_API_KEY" async></script> -
Connect your search button. Add
data-target-elementwith a CSS selector for the button or field that should open search:<button id="search-button">Search</button><scriptsrc="https://search.typemo.com/loader.js?k=YOUR_API_KEY"data-target-element="#search-button"async></script>Without it, visitors open search only with ⌘K, Ctrl+K or /. Embed options lists the other attributes.
Check it worked
Section titled “Check it worked”-
On Install → Installation, click Verify next to your domain. The first domain is checked when the page opens.
Result What to do Widget found on … — you’re live. Nothing. The page loads, but the snippet wasn’t found in its HTML. Paste the snippet, or see the next section if a script adds it. A Typemo script was found, but with a different key than this project’s. Replace the tag with this project’s snippet. The snippet on this page carries a Write & Read key, which the widget refuses. Replace the tag with this project’s snippet; only a Read only key loads the widget. Couldn’t reach … Check the address in Security → Allowed domains and that the site is up. -
Open your site, click your search button and type a few letters.
Tag managers and single-page apps
Section titled “Tag managers and single-page apps”- A tag manager or your app’s code can add the tag. The snippet finds itself by its address. Verify reads only the page’s HTML, so it misses such a tag: try a search on the site instead.
- Add the tag once, in the layout every route shares. Adding it again on a route change does nothing.
- A button rendered later isn’t connected.
data-target-elementconnects the elements on the page when the widget starts. For a button your app renders afterwards, calltypemoInstance.open()from its click handler. See the JavaScript API.
If search doesn’t work
Section titled “If search doesn’t work”Open the browser console on your site and look for a message from Typemo, or a failed request in the Network tab.
| What you see | Cause | Fix |
|---|---|---|
Typemo: /init answered HTTP 404, widget not loaded | The key in k= is unknown or was deleted | Copy the snippet from Install → Installation again |
Typemo: Target element "#search-button" not found | Nothing on the page matches data-target-element | Fix the selector, or open search from code as above |
A search request answers 403 | The site isn’t under Security → Allowed domains | Add it, including the staging sites you test on |
| No message and no widget | Search → Setup is set to API only and the AI Assistant is off | Pick Catalog or Docs, or turn the assistant on |
To confirm the widget started, add data-debug="true" to the tag: the console then logs a line
starting with Typemo: initialized. Remove it when you’re done. The widget doesn’t load
covers the remaining causes.
Next: Match the widget to your brand, or connect the cart button on a store.