Skip to content

Banner campaigns

View MD

Banner campaigns let you promote products, categories, brands, or seasonal content directly inside Luigi’s Box autocomplete and search results. In the Luigi’s Box application, you define which queries should trigger a banner, what image should be shown, where it should appear, and where the user should land after clicking it.

There is no separate banners endpoint. Banner campaign data is included in the standard autocomplete and search responses under the campaigns key.

If you are using Luigi’s Box frontend libraries, banner campaign support is already built in. Once you configure banner campaigns in the Luigi’s Box application, the libraries render them automatically.

If you built your own autocomplete or search UI on top of Luigi’s Box APIs, you must render banners yourself. When a query matches an active banner campaign, the response includes a campaigns array. Your integration is responsible for:

  • reading the returned positions
  • choosing the appropriate image URL for desktop or mobile
  • rendering the banner into your UI
  • linking the banner to the destination URL returned by the campaign

The campaigns array contains one or more campaign objects. Each object describes a banner campaign that matched the current query.

Each campaign object contains:

  • id — campaign identifier
  • target_url — destination URL opened after click
  • banners — object keyed by banner position

Each position inside banners contains:

  • desktop_url — image for larger screens
  • mobile_url — image for smaller screens
{
"campaigns": [
{
"id": 9,
"target_url": "https://www.e-shop.com/harry-potter",
"banners": {
"autocomplete_list": {
"desktop_url": "https://www.e-shop.com/harry-potter-1.jpg",
"mobile_url": "https://www.e-shop.com/harry-potter-2.jpg"
}
}
}
]
}
{
"campaigns": [
{
"id": 13,
"target_url": "https://www.e-shop.com/harry-potter",
"banners": {
"search_header": {
"desktop_url": "https://www.e-shop.com/harry-potter-1.jpg",
"mobile_url": "https://www.e-shop.com/harry-potter-2.jpg"
},
"search_footer": {
"desktop_url": "https://www.e-shop.com/harry-potter-3.jpg",
"mobile_url": "https://www.e-shop.com/harry-potter-4.jpg"
}
}
}
]
}
AreaPosition keyTypical placement
Autocompleteautocomplete_listBanner inside the list area
Autocompleteautocomplete_topBanner next to the featured top product
Searchsearch_headerBanner above the result list
Searchsearch_panelBanner in the side panel
Searchsearch_listBanner inserted into the results list
Searchsearch_footerBanner below the result list

Desktop: 310x240px (JPG, 620x480, max 600kb) Desktop banner for autocomplete_list

Mobile: 420x240px (JPG, 840x480, max 600kb) Mobile banner for autocomplete_list

Desktop: 240x450px (JPG, 480x900, max 600kb) Desktop banner for autocomplete_top

Mobile: 420x240px (JPG, 840x480, max 600kb) Mobile banner for autocomplete_top

Desktop: 1024x160px (JPG, 2048x320, max 600kb) Desktop banner for search_header

Mobile: 420x240px (JPG, 840x480, max 600kb) Mobile banner for search_header

Desktop: 240x280px (JPG, 480x460, max 600kb) Desktop banner for search_panel

Mobile: 420x240px (JPG, 840x480, max 600kb) Mobile banner for search_panel

Desktop: 340x490px (JPG, 680x980, max 600kb) Desktop banner for search_list

Mobile: 340x490px (JPG, 680x980, max 600kb) Mobile banner for search_list

Desktop: 1024x160px (JPG, 2048x320, max 600kb) Desktop banner for search_footer

Mobile: 420x240px (JPG, 840x480, max 600kb) Mobile banner for search_footer