generic-skin
Generic Skin / Wallpaper Module
This module allows us to configure prebidResponse listener that when a just premium or dspx wallpaper has won the auction
- removes certain other ad units
- hides the ad slot div where the skin was requested
Integration
In your index.ts import the generic-skin module and register it.
import { createSkin } from '@highfivve/module-generic-skin'
moli.registerModule(createSkin());
Enumerations
SkinConfigEffect
Enumeration Members
BlockOtherSlots
BlockOtherSlots:
"BlockOtherSlots"
BlockSkinSlot
BlockSkinSlot:
"BlockSkinSlot"
NoBlocking
NoBlocking:
"NoBlocking"
Interfaces
ISkinModule
Extends
IModule
Properties
description
readonlydescription:string
Inherited from
IModule.description
moduleType
readonlymoduleType:string
Inherited from
IModule.moduleType
name
readonlyname:string
Inherited from
IModule.name
Methods
config__()
config__():
null|Object
If the module has some sort of configuration this can be fetched with this method
Returns
null | Object
Inherited from
IModule.config__
configureSteps__()
configureSteps__():
ConfigureStep[]
Returns a list of steps that should be executed in the ad pipeline.
Returns
ConfigureStep[]
Inherited from
IModule.configureSteps__
configure__()
configure__(
moduleConfig?):void
Initialize the module with the given module configuration. Depending on the configuration the module may become active or inactive.
Parameters
• moduleConfig?: ModulesConfig
Returns
void
Inherited from
IModule.configure__
destroyAdSlot()
destroyAdSlot(
slotDefinitions,gWindow): (adSlotDomId) =>void
Parameters
• slotDefinitions: SlotDefinition<AdSlot>[]
• gWindow: IGoogleTagWindow
Returns
Function
Parameters
• adSlotDomId: string
Returns
void
getConfigEffect()
getConfigEffect(
config,bidResponses,log):SkinConfigEffect
Parameters
• config: SkinConfig
• bidResponses: IBidResponsesMap
• log: MoliLogger
Returns
initSteps__()
initSteps__():
InitStep[]
Returns a list of steps that should be executed in the ad pipeline.
Returns
InitStep[]
Inherited from
IModule.initSteps__
prebidBidsBackHandler__()
prebidBidsBackHandler__():
PrebidBidsBackHandler[]
This method is called in the bidsBackHandler of prebid.
A module may provide those callbacks if it needs to alter the requests send to the ad server.
The auctionEnd event cannot be used for this, as there's no guarantee the event handler
will run before the requestAds step.
Note: Amazon TAM (A9) also has a callback that could be used for similar things. Unfortunately
does the callback not provide the necessary information to implement any meaningful
business logic. Especially the cpm parameter and bidder
The callback receives additional information coming from the ad pipeline run.
Note: These callbacks should not perform any initialization code or only be created once as this array will be accessed on every pbjs.requestBids() callback.
Use cases
The generic-skin module provides prebid bids back handlers to block certain ad units from
being requested.
Returns
PrebidBidsBackHandler[]
See
- https://docs.prebid.org/dev-docs/publisher-api-reference/requestBids.html
- https://ams.amazon.com/webpublisher/uam/docs/web-integration-documentation/integration-guide/javascript-guide/api-reference.html#apstagfetchbids
Overrides
IModule.prebidBidsBackHandler__
prepareRequestAdsSteps__()
prepareRequestAdsSteps__():
PrepareRequestAdsStep[]
Returns a list of steps that should be executed in the ad pipeline.
Returns
PrepareRequestAdsStep[]
Inherited from
IModule.prepareRequestAdsSteps__
requestBidsSteps__()?
optionalrequestBidsSteps__():RequestBidsStep[]
Returns a list of steps that should be executed in the ad pipeline.
This step is optional, as should have been all steps to reduce implementation complexity of modules.
Note: prebid and amazon tam (a9) maybe implemented as modules in the future as they add those steps to the ad pipeline.
Returns
RequestBidsStep[]
Inherited from
IModule.requestBidsSteps__
runSkinConfigs()
runSkinConfigs(
skinModuleConfig): (ctx,bidResponses,slotDefinitions) =>void
Parameters
• skinModuleConfig: SkinModuleConfig
Returns
Function
Parameters
• ctx: AdPipelineContext
• bidResponses: IBidResponsesMap
• slotDefinitions: SlotDefinition<AdSlot>[]
Returns
void
selectConfig()
selectConfig(
skinModuleConfig,bidResponses,log):undefined|object
Parameters
• skinModuleConfig: SkinModuleConfig
• bidResponses: IBidResponsesMap
• log: MoliLogger
Returns
undefined | object
Functions
createSkin()
createSkin():
ISkinModule
Skin Module
Returns
filterHighestNonSkinBid()
filterHighestNonSkinBid(
bidResponses,blockedAdSlotDomIds):BidResponse[]
Parameters
• bidResponses: IBidResponsesMap
• blockedAdSlotDomIds: string[]
Returns
BidResponse[]