Constructor
new AdServerSasic(main)
Constructor of Sasic adapter
| Name | Type | Description |
|---|---|---|
main |
Object | Instance of the main CpexPackage class |
Methods
(async) call(adUnitsCodesopt)
Mandatory. Calls the adserver to get the final ads selected and rendered
| Name | Type | Attributes | Description |
|---|---|---|---|
adUnitsCodes |
Array. |
<optional> | Optional array of adUnit codes (hbKey) to query |
(async) getAdsList()
Mandatory. Returns (as a promise) an array of adUnit codes (hbKey), to be used for Headerbidding
getElementsList() → {Array.<string>}
Returns all element IDs for all ad units (S2S and HB)
Array of element IDs
- Type:
-
Array.
<string>
isFromHB(creative) → {boolean}
Determines if creative is from header bidding
| Name | Type | Description |
|---|---|---|
creative |
string | Ad HTML code |
True if from HB
- Type:
- boolean
load()
Mandatory. Initializes an adserver based on settings
prepareMetaData(elementId, adUnit, metaData)
Prepares an object with useful information for debugging. Merges info from both adserver and prebid.
| Name | Type | Description |
|---|---|---|
elementId |
string | Element ID |
adUnit |
string | Ad unit name |
metaData |
Object | Metadata about the ad, including width, height, SSP ID, FCID, HB key, etc. |
refresh()
- Deprecated
- Yes
render(elementId, adUnitopt, creative, width, height) → {boolean}
Interface for sasic library from ECO - false = let sasic render, true = we render
| Name | Type | Attributes | Description |
|---|---|---|---|
elementId |
string | Element ID |
|
adUnit |
string | <optional> | Ad unit name |
creative |
string | Ad HTML code |
|
width |
string
| |
Width |
|
height |
string
| |
Height |
Whether we render (true) or sasic (false)
- Type:
- boolean
sasicReRender()
- Deprecated
- Yes