with Freewheel

details and tweaks on how to use a Freewheel VAST and VMAP endpoint as ad server with broadpeak.io, using multiple ad break positions.


Freewheel ad server offers the opportunity to send information for multiple ad breaks within the same ad call, wether it's a live use case (preroll+ad replacement) or it's an AVOD use case (preroll+multiple midrolls).

As a prerequisite, you must be familiar with Ad server macros configuration in broadpeak.io, that maps values coming from different sources - player's manifest request url, SCTE35 markers or system - to query params in the VAST or VMAP request to the ad server.

Freewheel's endpoint consideration about macros order

In most of Ad server endpoints, & is the symbole used to separate the different macros in the query parameters string. Freewheel is additionnaly using ;to separate the different types of macros : context, user and device information or ad breaks details.

In that situation, it's important to keep a specific order with macros always remaining between the two; where they are meant to be placed.

For instance :

macro1=123&macro2=abc**;**macro3=1a can match Freewheel's needs although macro2=abc**;**macro3=1a&macro1=123 won't.

Configuration in broadpeak.io

This implies a specific focus in ad server end point configuration in broadpeak.io

Order

First, the initial order that is provided in Freewheel endpoint can be copy/past in URL field in broadpeak.io ad server source configuration.

The position of the semi colon will then have to remain the same throughout your configuration.

Forward values

To respect the position of each macro, forward type should not be used. Macros that are treated with forward are pushed to the end of the query string. To map a query param with the exact same query param name in VAST request, use the type from query param

Other types of macros (custom, from variables, from headers ) can be used as long as from query param.

Management of ;

For macros that are surrounding semi colon, a simple tweak will help keeping the semicolon at the right position.

Use the type custom, and the prefix associated to the policy type you want to apply for both macros.

For instance from query param will use the prefix $arg_, as shown in the screenshot below. Static values will require no prefix,, from header prefix is $http_. Note that a single line manages 2 query param : flag and _fw_google_audience.

ad break positions

live use case with preroll and ad replacement.

Ad break information related to positions (preroll and midroll) are managed in the last part of Freewheel endpoint. In live, preroll and midroll can be sent together as below :

;slid=pre&slau=**preroll**&maxd={maxd}&mind={mind}&flag={flag}&tpos=0;slid=midLive&slau=**midroll**&maxd={maxd}&mind={mind}&flag={flag}&tpos=0;

So from Freewheel standpoint, macros can be present twice in the url : slid, slau, maxd, mind, flag and tpos, to describe each ad break type (preroll and midroll).

broadpeak.io cannot manage this directly. 2 ad servers will be declared, one for preroll and one for midroll. In that situation the streaming request url done by the player will have to contain the information for both ad break types, and that will be mapped accordingly in broadpeak.io ad server configuration.

For instance

  • Player is requesting

;slid**-pre**=pre&slau**-pre**=preroll&maxd-pre=60&mind-pre=60&flag-pre=+play+sltp&tpos-pre=0;slid**-mid**=midLive&slau**-mid**=midroll&maxd-mid=60&mind-mid=60&flag-mid=+play+sltp&tpos-pre=0;

  • Preroll ad server is configured to only retrieve the "-pre" macros

;slid=$arg_slid**-pre**&slau=$arg_slau**-pre**&maxd=$arg_maxd**-pre**&mind=$arg_mind**-pre**&flag=$arg_flag**-pre**&tpos**-pre**=0;

  • And midroll ad server is configured to retrieve the "-mid" macros

;slid=$arg_slid**-mid**&slau=$arg_slau**-mid**&maxd=$arg_maxd**-mid**&mind=$arg_mind**-mid**&flag=$arg_flag**-mid**&tpos**-pre**=0;

AVOD use case

In AVOD use case, a single VMAP call to Freewheel needs to carry all the information about the different cuepoints : preroll and multiple midrolls. For instance :

;slid=pre&slau=preroll&ptgt=a&tpos=0;slid=mid7&slau=midroll&ptgt=a&tpos=7;slid=mid35&slau=midroll&ptgt=a&tpos=35;slid=mid123&slau=midroll&ptgt=a&tpos=123;slid=mid2880&slau=midroll&ptgt=a&tpos=2880;

broadpeak.io cannot map each cuepoint information. In such a situation, the "forward all" feature can be applied; the player streaming url will need to carry all the information for macros in the proper order. broadpeak.io will forward it untouched.