AdServerSasic

Sasic adapter for Smart AdServer (used by ECO)


Constructor

new AdServerSasic(main)

Constructor of Sasic adapter

Parameters
Name Type Description
main Object

Instance of the main CpexPackage class

Methods

(async) call(adUnitsCodesopt) @public

Mandatory. Calls the adserver to get the final ads selected and rendered

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

Optional array of adUnit codes (hbKey) to query


(async) getAdsList() @internal

Mandatory. Returns (as a promise) an array of adUnit codes (hbKey), to be used for Headerbidding


getElementsList() → {Array.<string>} @internal

Returns all element IDs for all ad units (S2S and HB), used for test code only

Returns

Array of element IDs

Type: 
Array.<string>

isFromHB(creative) → {boolean} @internal

Determines if creative is from header bidding

Parameters
Name Type Description
creative string

Ad HTML code

Returns

True if from HB

Type: 
boolean

load() @internal

Mandatory. Initializes an adserver based on settings


refresh()

Deprecated
  • Yes

render(elementId, adUnitopt, creative, width, height) → {boolean} @internal

Interface for sasic library from ECO - false = let sasic render, true = we render

Parameters
Name Type Attributes Description
elementId string

Element ID

adUnit string <optional>

Ad unit name

creative string

Ad HTML code

width string | number

Width

height string | number

Height

Returns

Whether we render (true) or sasic (false)

Type: 
boolean

sasicReRender()

Deprecated
  • Yes