Skip to content

Ad Formats

Ads come in four formats: strip, compact, card and full. The iOS and Android SDKs render all four; the Web SDK renders the strip and the 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 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 card for the space above the open keyboard: the image beside the title and a one-line description, with a full-width call-to-action button under them. It needs a slot at least 120 pt tall (120 dp on Android). As on the strip, when the ad has a call-to-action button, only the button opens the ad, and a description longer than the line scrolls.

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.

A large card for the space a closed keyboard leaves: a full-width image over the brand name, title and description, and a full-width call-to-action button. It needs a slot at least 272 pt tall (272 dp on Android). The card is 272 pt (272 dp) tall unless you pass a taller fullCardHeight to EloAdView, such as your keyboard’s height; the image takes the height the copy and the button leave. The whole card opens the ad. A close button in the top corner hides the ad in the view and calls onDismiss on EloAdView; nothing is sent to Elo.

The card’s and the full card’s description wraps to up to three lines and longer copy ends in an ellipsis. The strip’s and the compact card’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 tallest format that fits, or the card when you leave maxHeight unset. The Web SDK draws a compact ad as the strip and a full ad as the card, so it fits the same slot.

maxHeightiOS and AndroidWeb
Not setCardCard
272 or moreFullCard
192 to 271CardCard
120 to 191CompactStrip
72 to 119StripStrip
Below 72No ad. The request returns no fill.No ad. The request returns no fill.

Elo can also set a preferred format for your app. The server sends it whenever it fits the slot, and otherwise follows the table.

// 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.
  • For an ad above the keyboard, put an EloAdView with your slot’s height directly above your composer; see Ads above the keyboard for iOS and Android.
  • 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 nothing; the slot appears when the ad arrives.