Prerequisites
- A banner configured for your engine in MyCludo, with a test trigger term you can search for
- A working Search API integration using SiteKey credentials
How banners work
Banners are configured in MyCludo, not in your code, and can also be managed through the banner endpoints. Each banner has trigger terms and a block of HTML. When a search matches a trigger term, the Search API returns that banner in theBanners array of the response. Your site only needs to take that HTML and place it on the page.
1
Search as usual
Your site sends the visitor’s query to the Search API, as it does today.
2
Read the Banners array
Read
Banners from the same response. No extra request or parameter is needed.3
Render the banner HTML
Insert each banner’s
Banner value into a container above your results.4
Track banner clicks
Send a click event when a visitor clicks a banner, so it is counted in your analytics. See Track banner clicks.
Find banners in the response
Your existing search request does not change. The examples below use a test term as the query.The API reference example shows lowercase banner keys (
id, name). The live response uses Id, Name and Banner. Read Banner for the HTML.Banner value is self-contained HTML with inline styles, so your site CSS does not need to change. This is a sample banner returned for a test term, not a recommended design:
Render banners on the page
Add a container where the banner should appear, above your results list, then pass it the response your search code already receives. The same approach works in any CMS or framework: put the container in the search results template and load your script through the CMS’s normal asset mechanism.Id as data-banner-id. You need that ID to track clicks.
- Clear it on each search. Setting
innerHTMLreplaces the previous banner. If a new query returns no banners, the container empties, which is what you want. - Output as raw HTML. Use your framework’s raw HTML output (for example
innerHTML,v-htmlordangerouslySetInnerHTML). Escaping the value shows the markup as text, and some sanitizers strip inline styles and break the design.
Track banner clicks
A direct call to the Search endpoint does not record analytics, and banner clicks are not tracked automatically. If you skip this step, banner clicks will not appear in your reports. Send two kinds of event:- The search itself, with Track Search Query (
querylog), so the search that triggered the banner is counted. - Each banner click, with Track Result Click (
clicklog), using the banner-specific values below.
values object. See the Analytics Guide for the full list of parameters, the Search-as-you-type rules and server-side IP forwarding.
Troubleshooting
For other API errors, see Troubleshooting.

