For the complete documentation index, see llms.txt. This page is also available as Markdown.

Response Renderers

The Ad Placement API response JSON contains the zones array and the renderers and user objects.

In this page we will explain the renderers object, which can be employed to independently render different containers and ads on your webpage.

Container Renderers

These renderers are designed to generate various types of containers where you can conveniently display the ads. The render function of the container renderers will return an array with the placeholders that you can use to place the ads.

As for the zone object, you can pass the same object you received in the Ad Placement response, with the difference that you do not need to pass the zones.type.

Fixed Container Renderer

Used to render a container with a fixed position on the page.

This script will expose the window.FixedContainerRenderer variable, which you can use to interact with the renderer. For example, by calling window.FixedContainerRenderer.render(zone, placeholder); it is possible to render the container on the page.

Available renderer functions:

Function
Parameter Names
Required
Parameter Description

render()

zone

Yes

Zone object containing information for rendering

placeholder

Yes

HTML element indicating where to render the container

cookieConsent

No

Boolean indicating if the user consents to cookies

Sticky Container Renderer

This script will expose the window.StickyContainerRenderer variable, which you can use to interact with the renderer. For example, by calling window.StickyContainerRenderer.render(zone, placeholder); it is possible to render the container on the page.

Available renderer functions:

Function
Parameter Names
Required
Parameter Description

render()

zone

Yes

Zone object containing information for rendering

placeholder

Yes

HTML element indicating where to render the container

cookieConsent

No

Boolean indicating if the user consents to cookies

setBorder()

zoneId

Yes

ID of the zone to set the border for

width

Yes

Width of the border

color

Yes

Color of the border

removeBorder()

zoneId

Yes

ID of the zone to remove the border from

setPosition()

zoneId

Yes

ID of the zone to set the position for

horizontalPosition

Yes

Horizontal position of the zone

verticalPosition

Yes

Vertical position of the zone

Instant Message Container Renderer

Used to render a instant message container on the page.

This script will expose the window.InstantMessageContainerRenderer variable, which you can use to interact with the renderer. For example, by calling window.InstantMessageContainerRenderer.render(zone, placeholder); it is possible to render the container on the page.

Available renderer functions:

Function
Parameter Names
Required
Parameter Description

render()

zone

Yes

Zone object containing information for rendering

placeholder

Yes

HTML element indicating where to render the container

cookieConsent

No

Boolean indicating if the user consents to cookies

Mobile Instant Message Container Renderer

Used to render a instant message container for mobile on the page.

This script will expose the window.MobileInstantMessageContainerRenderer variable, which you can use to interact with the renderer. For example, by calling window.MobileInstantMessageContainerRenderer.render(zone, placeholder); it is possible to render the container on the page.

Available renderer functions:

Function
Parameter Names
Required
Parameter Description

render()

zone

Yes

Zone object containing information for rendering

placeholder

Yes

HTML element indicating where to render the container

cookieConsent

No

Boolean indicating if the user consents to cookies

Fullpage Interstitial Container Renderer

Used to render a fullpage interstitial container for desktop or mobile on the page.

This script will expose the window.FullpageInterstitialContainerRenderer variable, which you can use to interact with the renderer. For example, by calling window.FullpageInterstitialContainerRenderer.render(zone, placeholder); it is possible to render the container on the page.

Available renderer functions:

Function
Parameter Names
Required
Parameter Description

render()

zone

Yes

Zone object containing information for rendering

placeholder

Yes

HTML element indicating where to render the container

cookieConsent

No

Boolean indicating if the user consents to cookies

Group Container Renderer

This script will expose the window.GroupContainerRenderer variable, which you can use to interact with the renderer. For example, by calling window.GroupContainerRenderer.render(group, placeholder); it is possible to render the container on the page.

Available renderer functions:

Function
Parameter Names
Required
Parameter Description

render()

group

Yes

Group object containing information for rendering

placeholder

Yes

HTML element indicating where to render the container

cookieConsent

No

Boolean indicating if the user consents to cookies

Content Renderers

These renderers are responsible for displaying the ads within a container. Some are self-contained and do not require a container.

This script will expose the window.BannerRenderer variable, which you can use to interact with the renderer. For example, by calling window.BannerRenderer.render(zone, placeholder); it is possible to render the ad.

Available renderer functions:

Function
Parameter Names
Required
Parameter Description

render()

zone

Yes

Zone object containing information for rendering

placeholder

Yes

HTML element indicating where to render the ad, such as a container

cookieConsent

No

Boolean indicating if the user consents to cookies

Native Content Renderer

This script will expose the window.NativeRenderer variable, which you can use to interact with the renderer. For example, by calling window.NativeRenderer.render(zone, placeholder); it is possible to render the ad.

Available renderer functions:

Function
Parameter Names
Required
Parameter Description

render()

zone

Yes

Zone object containing information for rendering

placeholder

Yes

HTML element indicating where to render the ad, such as a container

cookieConsent

No

Boolean indicating if the user consents to cookies

Outstream Video Content Renderer

This script will expose the window.OutstreamVideoRenderer variable, which you can use to interact with the renderer. For example, by calling window.OutstreamVideoRenderer.render(zone, placeholder); it is possible to render the ad.

Available renderer functions:

Function
Parameter Names
Required
Parameter Description

render()

zone

Yes

Zone object containing information for rendering

placeholder

Yes

HTML element indicating where to render the ad, such as a container

cookieConsent

No

Boolean indicating if the user consents to cookies

In-Page Push Notification Content Renderer

This script will expose the window.InPagePushNotificationRenderer variable, which you can use to interact with the renderer. For example, by calling window.InPagePushNotificationRenderer.render(zone, placeholder); it is possible to render the ad.

Available renderer functions:

Function
Parameter Names
Required
Parameter Description

render()

zone

Yes

Zone object containing information for rendering

placeholder

Yes

HTML element indicating where to render the ad, such as a container

cookieConsent

No

Boolean indicating if the user consents to cookies

Last updated

Was this helpful?