PublisherMafra

Publisher-specific class for Mafra


Constructor

new PublisherMafra(main)

Constructor of PublisherMafra class

Parameters
Name Type Description
main Object

Instance of the main CpexPackage class

Methods

reRender(params) @public

Wraps HB reRender to add metadata

Parameters
Name Type Description
params object

Parameters object

Properties

Name Type Description
elementId string

DOM element ID for the ad unit

adUnit string

Header bidding key (optional, defaults to elementId)


(async) refresh(adUnitsopt) → {Promise.<boolean>} @public

Refreshes specific ad positions for Mafra

Parameters
Name Type Attributes Description
adUnits Array.<string> <optional>

Array of adUnit codes to refresh

Returns

True if successful

Type: 
Promise.<boolean>

configureBidderConfigs(bidderConfigs) @internal

Configures Mafra-specific bidder configs.

Parameters
Name Type Description
bidderConfigs Object.<string, Object>

Mutable Prebid configs keyed by bidder; delete a schain property to disable it


createSlideup(winningBid) @internal

Creates a slideup format using the Mafra's Ads library, with the winning bid rendered inside. Supports both native and iframe ads.

Parameters
Name Type Description
winningBid Object

The winning bid object returned from the auction, containing information such as adUnitCode, adId, width, height, and native data.


createVignette(winningBid) @internal

Creates a vignette format using the Mafra's Ads library, with the winning bid rendered inside.

Parameters
Name Type Description
winningBid Object

The winning bid object returned from the auction, containing information such as adUnitCode, adId, width, height, and native data.


(async) getAdUnitElementId(hbKey) → {Promise.<(string|null)>} @internal

Used for header-bidding (must be async for consistency with all publishers)

Parameters
Name Type Description
hbKey string

Header bidding key

Returns

Element ID or null

Type: 
Promise.<(string|null)>