Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion modules/insticatorBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,26 @@ function buildImpression(bidRequest) {
insticator: {
adUnitId: bidRequest.params.adUnitId,
adUnitName: bidRequest.params.adUnitName,
impressionType: bidRequest.params.impressionType
},
}

/**
* set impression type using header bidding wrapper's API
* this is Insticator header bidding wrapper specific

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this logic should be in our ad code. Do we want our prebid bid adapter to have code that depends on our header code implementation? I think we'd be better off just setting ext.insticator.impressionType in our ad code.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chatted with @insticator-biY about this. As this is really meant to be used as part of our internal instiBid build this seems less of an issue. Let's go forward with this and see how it all works.

*/
// eslint-disable-next-line no-undef
if (bidRequest.adUnitCode && Insticator.getAdUnitStates) {
try {
// eslint-disable-next-line no-undef
const adUnits = Insticator.getAdUnitStates();
const adUnit = adUnits[bidRequest.adUnitCode]
// eslint-disable-next-line no-undef
if (adUnit) ext.insticator.impressionType = adUnit.timesRefreshed > 0 ? adUnit.refreshType : 'il';
} catch (e) {
console.warn(e)
}
}

const sizes =
deepAccess(bidRequest, 'mediaTypes.banner.sizes') || bidRequest.sizes;

Expand Down