Add Invibes Adapter#2202
Conversation
modules/invibesBidAdapter.js
Outdated
|
|
||
| export const spec = { | ||
| code: CONSTANTS.BIDDER_CODE, | ||
| aliases: [CONSTANTS.BIDDER_CODE], |
There was a problem hiding this comment.
I see no reason to do this. It will replace your already registered adapter.
There was a problem hiding this comment.
Sorry, I don't understand where the mistake is. If I don't export, my tests are failing because I can't import the spec. If I don't register the spec, my bidder is not called
There was a problem hiding this comment.
@rcheptanariu I should have explained it in detail.
By adding aliases: [CONSTANTS.BIDDER_CODE], you are re-registering the adapter as you are using the same constant.
So you should remove the line aliases: [CONSTANTS.BIDDER_CODE] or use some different alias.
modules/invibesBidAdapter.js
Outdated
| }); | ||
|
|
||
| const topWin = getTopMostWindow(); | ||
| var invibes = topWin.invibes = topWin.invibes || {}; |
| .replace('creativeHtml', bidModel.CreativeHtml); | ||
| } | ||
|
|
||
| function getCappedCampaignsAsString() { |
There was a problem hiding this comment.
What is the purpose of this function ?
There was a problem hiding this comment.
We have a campaign capping functionality that limits the amount of times the user should get an ad from the respective campaign, in a given time frame. An id is stored in localStorage, together with a view count and a timestamp.
That function returns a formatted parameter that we send from the adapter to our system to know if the campaign can be displayed again at the moment, to the current user.
modules/invibesBidAdapter.js
Outdated
| } | ||
|
|
||
| /// Local domain cookie management ===================== | ||
| var Uid = { |
There was a problem hiding this comment.
Can you share how are you using these cookie functions and what is their purpose ?
There was a problem hiding this comment.
ivNoCookie -> no cookies should be set for the user
ivbsdid -> a user id cookie. The entire 'Uid' +'initDomainId' is logic is for filtering (the user must return at least several times in multiple days. Else it is considered a temporary id and not sent with the bid request)
IvbsCampIdsLocal -> list of clicked campaign ids of the user
random test cookie -> to check for top cookie domain. We remove it afterwards
modules/invibesBidAdapter.js
Outdated
| ttl: CONSTANTS.TIME_TO_LIVE, | ||
| ad: renderCreative(bidModel), | ||
|
|
||
| placementCode: bidRequest.placementCode |
There was a problem hiding this comment.
No need to add placementCode in bidResponse here.
|
Also need a docs PR before merge. Please submit a PR to the docs repo to add a file for your adapter to the bidders directory so your adapter's params will appear on the bidders page. Thank you for contributing |
|
Docs PR at: prebid/prebid.github.io#638 |
|
Can you please confirm if the updates have been done as requested? |
modules/invibesBidAdapter.js
Outdated
| const key = 'ivvcap'; | ||
|
|
||
| let loadData = function () { | ||
| return JSON.parse(localStorage.getItem(key)) || {}; |
There was a problem hiding this comment.
Any JSON.parse calls should be within a try/catch block
* 'master' of https://github.com/prebid/Prebid.js: (76 commits) Updated adUnitCode (prebid#2262) vastUrl is set based on nurl for video. (prebid#2249) Added ad id to a4g bid (prebid#2250) Add billing url (burl) support (prebid#2246) Fix: add mediatype in bid response (prebid#2260) use b64EncodeUnicode to encode strings with unicode chars in them (prebid#2245) create RELEASE_SCHEDULE.md (prebid#2255) Update Platform.io Adapter (prebid#2230) Update Lifestreet adapter to 1.0 (prebid#2197) PBS adapter not sending app or device (prebid#2206) Fix prebid#2229 - Edge cookie string form (prebid#2236) Add Invibes Adapter (prebid#2202) Increment pre version Prebid 1.5.0 Release Fix cross-platform test failures (prebid#2228) Fix uncahced video bids from multi-response array triggering callback early (prebid#2219) Add vuble adapter (prebid#2201) Update Vidazoo domain (prebid#2223) InSkin Bid Adapter: remove referrer field from request body (prebid#2217) Gamma Support UserSync Endpoint (prebid#2216) ...
* master: Audience Network: Add 'pbv' and 'cb' query params (prebid#2252) Add e-planning analytics adapter (prebid#2211) Add vastUrl for Gamma Adapter Video (prebid#2261) update params for test bid (prebid#2267) Updated adUnitCode (prebid#2262) vastUrl is set based on nurl for video. (prebid#2249) Added ad id to a4g bid (prebid#2250) Add billing url (burl) support (prebid#2246) Fix: add mediatype in bid response (prebid#2260) use b64EncodeUnicode to encode strings with unicode chars in them (prebid#2245) create RELEASE_SCHEDULE.md (prebid#2255) Update Platform.io Adapter (prebid#2230) Update Lifestreet adapter to 1.0 (prebid#2197) PBS adapter not sending app or device (prebid#2206) Fix prebid#2229 - Edge cookie string form (prebid#2236) Add Invibes Adapter (prebid#2202)
Type of change
Description of change
Added Invibes adapter to connect to Invibes for bids
contact email of the adapter’s maintainer: system_operations@invibes.com
official adapter submission
A link to a PR on the docs repo: Invibes Adapter - documentation prebid.github.io#638