Skip to content

Ad Formats

The iOS, Android, and Web SDKs render ads in one of two formats: strip and card. You do not pick the format. You tell the SDK how much space the ad slot has, and Elo returns an ad in the largest format that fits.

A single compact row for small slots, such as the space above the keyboard or next to a composer. It needs a slot at least 72 pt tall (72 dp on Android, 72 px on the web). On Android the strip itself is 76 dp tall, so give it 76 dp when you can.

Slot height
72 pt or more

When the ad has a call-to-action button, only the button opens the ad, so a tap next to a text field does not open it by accident. When there is no button, the row ends in a chevron and the whole strip opens the ad.

A larger surface for slots between chat messages. It needs a slot at least 192 pt tall (192 dp on Android, 192 px on the web). The card takes the height its copy needs, from 87 pt on iOS (92 dp on Android) for one line without a call-to-action button up to 175 pt (190 dp), so leave the slot unbounded where you can.

Slot height
192 pt or more

The card is set like a feed ad on every platform: a header row with the brand mark beside the brand name and the “Ad” disclosure under the name, the description as body copy at the card’s full width, and the call-to-action button on a row of its own at the trailing edge. Without a call-to-action label, a chevron closes the header row instead.

The whole card opens the ad, with or without a call-to-action button.

Slot height
192 pt or more

A card for an ad without a call-to-action label ends its header row in a chevron.

The card’s description wraps to up to three lines and longer copy ends in an ellipsis. The strip’s description is one line: on iOS and Android, when it is longer than the line, it scrolls to show the end a few times and then stays still with an ellipsis, and never scrolls when the device has reduce motion turned on. On the web the strip’s description ends in an ellipsis without scrolling.

Pass the height available for the ad as maxHeight. Elo compares it with each format’s minimum height and returns the card when it fits, otherwise the strip.

maxHeightFormat
Not setCard
192 or moreCard
72 to 191Strip
Below 72No ad. The request returns no fill.
// A 72 pt slot above the composer receives a strip.
let result = await Elo.loadAd(messages: messages, maxHeight: 72)
// A request-owning view takes the same parameter.
EloAdView(messages: messages, maxHeight: 72)
  • Leave maxHeight unset for ads between chat messages, where the list can grow to fit a card.
  • The keyboard banner (.eloKeyboardBannerAd on iOS, EloKeyboardBannerAd on Android) passes the strip’s height for you, so it always receives a strip.
  • You can also pass maxWidth. Elo records it with the request, but no format has a minimum width, so it does not change which format is chosen.
  • While the request is loading, the iOS and Android SDKs show a placeholder in the shape of the format your maxHeight allows, so the layout does not shift when the ad arrives.