# AdServer Files in this folder are all AdServer adapters to support multiple libraries that connect to an AdServer and wrap them with a common outward interface. In general, an ad-server is a mandatory service that should be usable on it's own. It takes the ad positions, chooses what ads with highest prices available and renders the selection into the target page element. When header-bidding is enabled, the adserver call waits for completion of the Prebid auction. Regardless it has to run anyway some time after the DOM is loaded. ## Methods All adapters have to implement these methods: - load (loads prerequisites) - call (sends network request for ads) - getAdsList (returns plain string array of adUnit ids) - getElementById (returns elementId for an adUnit code) - refresh (refreshes the S2S position) ## Adapters | AdServer | Interfacing library | Acronyms | Handle | Queue | Network keyword | |----------|------------------------|-----------------|--------------|------------------|-----------------| | GAM | **Google Ad Manager** | *GAM, GPT, DFP* | `googletag` | `googletag.cmd` | doubleclick | | SAS | **SAS Tracker** | *SAS* | `sasTracker` | `sasTracker.que` | ball | | SAS | **Sasic** | | `_sasic` | `_sasic_queue` | ball | | SAS | **Paticka.js** | | `Ads` | | ball | | Adform | **Adform tag** | | `adformtag` | `adformtag` | adform | ## Test There is also adserver "Test", which immediately returns sample creatives based on keywords in url. For example if url contains string "interscroller", the adserver will return the interscroller sample. ## SAS Tracker The most used integration. Allows passing of these variables (called tokens): https://support.sas.com/kb/53/297.html We're using that with SAS feature called Snippets to pass these variables into `cpexPackage.adserver.adRendered` function. Note: We must get positionIdentifyingParam from settings instead of sastracker itself, so we don't have to wait for the library to load to run headerbidding. ## Creative Metadata | Attribute | Note | |-----------|------------------------------------------------------------------| | adapter | Which adserver adapter was used, specific version | | id | Id at the adserver | | name | Name of the area, from adserver mapping | | hb.bidder | Won header-bidding, which SSP was the bidder | | hb.cpm | Won header-bidding, what was the cpm | | hb.size | Won header-bidding, which size have won | | hb.sspId | Which SSP the ad belongs to |