A dynamic suggestion ad is created in real-time to suggest relevant, sponsored follow-ups to the ongoing conversation. We recommend showing it as a follow-up to after the last assistant response. We recommend using it along with an Inline ad or Box ad that will link to the advertiser website and drive conversion.

Suggestion

How to use a Dynamic Suggestion Ad

  • code - Code for unique identification of the ad placement (you get this code from us during onboarding)
  • messageId - Unique ID of the message the ad is tied to
  • onClick - Handler that takes the suggested ad text. You can send the message user clicked to assistant or to add it to the chat input.
  • leftIcon? - Icon to be shown on the left side of the suggestion (optional)
  • rightIcon? - Icon to be shown on the right side of the suggestion (optional)
<QueryStream
    code="<your-code>"
    onClick={(suggestion) => window.alert('Clicked on ad with suggestion: ' + suggestion)}
    leftIcon={<SearchIcon/>}
    messageId="<unique-message-id>"
/>

Custom styling

  • .mb-query-stream - Top level wrapper class
  • .mb-query-stream-left-icon - Left icon class
  • .mb-query-stream-right-icon - Right icon class