Choose your starting point
- Hero form for a search field in your page’s main section.
- Header button to open the popup for a new question.
- Starter questions to submit a question in one click.
- Search links to share a question by URL.
- Floating bar for a built-in input on enabled pages.
Part 1. Create the prompt
Load one tag
An index contains the content Webless searches. In Console, open Setup for your index. Publish the tag, then copy the production script from the JavaScript install method. Use a staging origin that Webless has authorized to run that tag. The quickstart covers the launch path, and Install the Webless tag covers installation and domain checks.Put one script in your shared layout. If a template or tag manager already loads the published script for your index, reuse it. Replace earlier demo scripts.Replace An external script with
https://YOUR-TAG-URL with your published URL. Keep the ID, status region, and helper for the prompt examples.Shared layout
defer runs after the browser parses the page. If you put the hero handler in its own deferred file, list it after the tag.See advanced loading for dynamic scripts and custom mounts.Pick your prompt
Choose the controls you want to add after the shared layout from Step 1. Use native buttons and links, give the input a visible label, and keep keyboard focus visible.
- Hero form
- Starter questions
- Search links
- Floating bar
Send a trimmed question from the main section of your page when a visitor presses Enter or selects Ask.
Hero search form
Part 2. Create the result
Open the result
After the tag script executes, open the popup and submit a question.You should see the answer stream into the popup. Use the follow-up field to ask another question.
Open with attribution
Try it
See popup controls for the other forms ofopen(), closing, toggling, and checking whether the widget has mounted.Part 3. Go live
Try a complete HTML file
Copy this file to your staging site and replace
https://YOUR-TAG-URL with your published Standard tag URL. If you’re adapting it to a custom tag that requires a mount, put the required mount at the marked spot before the script. When you move this into an existing layout, reuse its tag script.Complete HTML file
Run the QA checklist
- Confirm the page loads one tag and mounts one widget. Open one popup, submit a question and a follow-up, and verify both answers.
- Close the popup with the keyboard and check that focus returns to the starting control.
- Check visible focus, styling, and touch targets at a desktop width and at 375 pixels.
- Block the script on staging and confirm the status region announces the failure.
- Hero form: Submit with Enter and with Ask. Check for one search per action and confirm blank input skips search.
- Header button: Confirm it opens the popup for a new question.
- Starter questions: Select each button and check that it submits the displayed text. Check CMS-managed questions after a fresh page load.
- Search links: Open links with a question and with a blank value. Check that only the populated link runs a search.
- Floating prompt bar: Try the expanded input and the collapsed launcher.
- Custom mount and visibility: Confirm one required mount before the script. Check each CMS visibility choice. On hero-only pages, close the popup and confirm the floating input and launcher stay hidden.
- Page visibility and routing: Check an excluded page and an enabled page. In a single-page app, navigate between them and test Back and Forward.
- Consent and analytics: Test your consent flow. If analytics are enabled, verify the search event’s
location.
Troubleshoot the integration
An old demo or two widgets appear
An old demo or two widgets appear
Check the shared layout, page template, and tag manager. Remove the earlier demo or duplicate script and keep the published URL for your intended index. Keep one required mount on custom installations. Refresh after updating the template.
WeblessTag is undefined or the hero does nothing
WeblessTag is undefined or the hero does nothing
Confirm the published script loads and executes before the handler calls it. For dynamic loading, wait for the script’s
load event. Keep the script and any required mount on hero pages. Verify that the route allows Webless and that the form submits a non-empty question.The script or a search request fails
The script or a search request fails
Check Network for a failed request and Console for a blocked content security policy directive. Confirm the script URL and the allowed script and connection origins. Use the Step 1 status region to tell visitors to refresh and retry.
Floating search flashes or shows the wrong state
Floating search flashes or shows the wrong state
For custom tags with prompt bar controls, set the mount attribute before load. After load, use
showPromptBar() or hidePromptBar(). Showing the prompt restores the visitor’s saved preference, which may be the collapsed launcher. See floating prompt visibility.The widget mounts in the wrong place
The widget mounts in the wrong place
If your installation specifies a mount target, render it before the script runs and keep it in the persistent layout.
Open returns false or close and toggle do nothing
Open returns false or close and toggle do nothing
Check Network to confirm the script loaded. Once the global is available,
open() queues before mount and returns false. Check get() before using close() or toggle(). If search never mounts, check the page rules and startup settings. See Standard tag return values.Search changes after routing or publishing
Search changes after routing or publishing
Verify the route’s page rule, keep one persistent widget host, and bind your handlers once per control. For stale styling, questions, or settings, check publication and retry with a fresh load after caches refresh.
What to collect for support
What to collect for support
Share the affected page, steps to reproduce, viewport, and relevant browser errors with sensitive values removed. For visibility issues, include an enabled page and an excluded page.
Assign ownership and go live
- Your CMS team owns the page visibility setting. Map it to the startup attribute, page configuration, or supported runtime control.
- Your site team owns the hero form, header button, starter question buttons, search links, and their styling and responsive behavior. Compare the staging page with your live site design in QA.
- Webless supplies the tag, search, answer popup, and follow-up field.
Advanced
Advanced loading
The Standard script creates its own widget host. Use these options when your installation supplies a mount or inserts its script dynamically.Custom tag mount
Custom tag mount
Custom tags with prompt bar controls, such as the InterSystems tag.For InterSystems, keep the existing mount in the shared layout even when you hide the floating prompt. The tag needs it to start and open the result. Keep its existing placement if it also renders your header control. Place this element before the deferred script from your custom installation.
InterSystems mount
Load asynchronously or after consent
Load asynchronously or after consent
If your site inserts the script dynamically, use its
load callback. Start the loader once in place of the static script. Await the same promise from your controls. This example opens the popup when the script loads. Move the .then() and .catch() chain into your click or submit handler to open it on demand.Keep the #search-status region from the shared layout and use your published tag URL.Dynamic loading
Show or hide the floating prompt
Custom tags with prompt bar controls, such as the InterSystems tag. These controls are unavailable on the Standard tag. Keep the visibility decision in your CMS. For an InterSystems page, render its choice on the mount before the tag starts."true" or "false" on the mount takes precedence. With both settings omitted, floating search is enabled and follows the visitor’s saved collapsed or expanded preference.
Set the initial prompt bar state
Hide the floating prompt
Show the floating prompt
Choose where it appears
Use Page visibility in Console to exclude a page or section. Publish the changes. The Standard tag keeps its floating search and popup available together on enabled pages. If your CMS decides whether search should mount, use one of these startup settings. Both suppress the whole search widget, including the popup. The HTML attribute works on<html> or <body>. Its presence disables search, even with a value of "false".
- HTML attribute
- Page configuration
Put
data-webless-disable-search on <html> or <body> before the script runs. Remove it entirely on pages where search should mount.CMS template without search
Handle client-side navigation
Keep one script and its widget host in the persistent layout outside the content your router replaces. On visible routes, reuse the same widget. With published Console page rules, the runtime can unmount on excluded routes and mount again on visible ones. Update your page controls as the route changes. Process a search link once per intended navigation. Check Back and Forward for duplicate search submissions.Handle consent and private sessions
Follow your site’s consent policy before loading the tag or forwarding analytics. Analytics & session tracking in Console controls event capture. The Standard popup API has no per-call consent or private-session setting. A private-session flag comes from a host adapter.Reference
Close, toggle, and read state
Choose an open call
Callopen() without input to let the visitor enter their own question. Pass a string to search immediately.
Open the popup
Open and search
nav for a control in your page or floating for a floating control. The default is floating. When the tag tracks a search, this value appears in the outgoing search analytics event’s location field. Use your site analytics to distinguish the hero form from the header button.
Close or toggle the popup
Useget() to check whether the widget has mounted. Run the close and toggle calls independently. They control the popup and leave floating prompt availability alone.
Close the result
Toggle the result
Check for a mounted widget
Check readiness
Once the Standard tag script executes,open() can queue a call while the widget mounts. Use get() for a mounted handle. The Standard tag has no readiness promise.
The tag can dispatch webless:ready on document when event capture is on and the session is non-private. The event carries no detail. Use the script’s load event and the open queue for startup.
Observe the optional ready event
Standard tag
query, location, or customerId in the open() options object. For one tag, omit customerId. Use the tag’s runtime ID if you supply it. The Console index ID is a separate value.
close() and toggle() return true when applied, or false if the widget is unavailable. They require a mounted widget and skip queuing. Confirm the result in the popup after search.
Browser declaration for TypeScript
Browser declaration for TypeScript
webless-tag.d.ts
Custom tags with prompt bar controls
Saved starter questions
Custom tags with prompt bar controls, such as the InterSystems tag. After the script loads, call this inside an async function to reuse the floating prompt’s starter questions.Saved starter questions
Changelog
- 2026-11-24 · Added the custom search guides and Standard tag controls reference. Split the integration into task guides and added illustrations.
- 2026-11-24 · Combined the setup and examples into one guide so you can follow the steps in order. Added screenshots of the controls and answer popup.
- 2026-11-24 · Added the full prompt-to-result walkthrough, custom tag controls, and rollout checklist to this guide.
- 2026-11-24 · Added interactive previews and moved optional controls into advanced setup and reference.