Add Fidelity adapter#862
Add Fidelity adapter#862matthewlane merged 5 commits intoprebid:masterfrom onaydenov:fidelity_adapter
Conversation
matthewlane
left a comment
There was a problem hiding this comment.
Thanks for the PR. Tests are passing and was able to validate bids with the provided parameters. Just left a few questions and notes for your review below, thanks
src/adapters/fidelity.js
Outdated
| if (document.MAX_used !== ',') m3_u += '&exclude=' + document.MAX_used; | ||
| m3_u += document.charset ? '&charset='+document.charset : (document.characterSet ? '&charset='+document.characterSet : ''); | ||
|
|
||
| var loc = window.top !== window ? document.referrer:window.location.href; |
There was a problem hiding this comment.
window.top will crash the browser when called from inside a cross-domain iframe. Please wrap window.top in a try/catch block at minimum
There was a problem hiding this comment.
Done, wrapped window.top in a try/catch block
src/adapters/fidelity.js
Outdated
| } | ||
|
|
||
| function addBlankBidResponses(placementsWithBidsBack) { | ||
| var allFidelityBidRequests = $$PREBID_GLOBAL$$._bidsRequested.find(bidSet => bidSet.bidderCode === 'fidelity'); |
There was a problem hiding this comment.
You've defined 'fidelity' in FIDELITY_BIDDER_NAME on line 8, could use that here to avoid duplicating the string
There was a problem hiding this comment.
Definition 'fidelity' replaced with variable FIDELITY_BIDDER_NAME
src/adapters/fidelity.js
Outdated
| if (!utils.contains(placementsWithBidsBack, fidelityBid.placementCode)) { | ||
| // Add a no-bid response for this placement. | ||
| var bid = bidfactory.createBid(STATUS.NO_BID, fidelityBid); | ||
| bid.bidderCode = 'fidelity'; |
There was a problem hiding this comment.
FIDELITY_BIDDER_NAME could go here also
There was a problem hiding this comment.
Definition 'fidelity' replaced with variable FIDELITY_BIDDER_NAME hete too.
src/adapters/fidelity.js
Outdated
| function _callBids(params) { | ||
| var bids = params.bids || []; | ||
| bids.forEach(function (currentBid) { | ||
| if (!document.MAX_used) document.MAX_used = ','; |
There was a problem hiding this comment.
I'm curious about why a variable is being attached to the document object like this? Could an internal function variable be used instead?
There was a problem hiding this comment.
This one has been removed
src/adapters/fidelity.js
Outdated
| if (document.referrer) m3_u += '&referer=' + encodeURIComponent(document.referrer); | ||
| if (document.context) m3_u += '&context=' + encodeURIComponent(document.context); | ||
| if (currentBid.params.click) { | ||
| document.MAX_ct0 = decodeURI(currentBid.params.click); |
There was a problem hiding this comment.
Curious about attaching a variable to the document object here too
There was a problem hiding this comment.
This one has been removed also
|
Hi Matt @matthewlane , |
|
We'll perform additional checks to discover why we see this - "CI build failed" |
|
Test #1276 passed successfully. It looks like everything is correct. Let me know if we should do anything else. |
|
Hello Matt @matthewlane |
|
@onaydenov |
|
@onaydenov |
|
@mkendall07 |
…ebid-official-0.17.0 to release/1.12.0 * commit 'bce975978c2c088d301d120b949d38080ca9d314': Add changelog entry. Prebid Release 0.17.0 remove hb_pb targeting key for deal bids with no cpm (prebid#881) Fix for bug prebid#866 (prebid#867) Allow changing of 'ga' global variable (prebid#832) emit auction end event before bidsBackHandler callback (prebid#884) Add Widespace adapter (prebid#846) prevent rubicon adapter from registering two bids on exceptions (prebid#854) Code Refactoring - Upgrading end point. (prebid#826) Ignore test html pages (prebid#878) Detect browser width instead of the screen width (prebid#837) New aardvark adapter with support for aliasing (prebid#875) Add Fidelity adapter (prebid#862) Adkernel adapter aliasing (prebid#857) 0.16.1-pre
…12.0 to master * commit '728f1763ce2a282a757546e934199313a4771a21': Fix failing unit test on CI. Add changelog entry. Prebid Release 0.17.0 remove hb_pb targeting key for deal bids with no cpm (prebid#881) Fix for bug prebid#866 (prebid#867) Allow changing of 'ga' global variable (prebid#832) emit auction end event before bidsBackHandler callback (prebid#884) Add Widespace adapter (prebid#846) prevent rubicon adapter from registering two bids on exceptions (prebid#854) Code Refactoring - Upgrading end point. (prebid#826) Ignore test html pages (prebid#878) Detect browser width instead of the screen width (prebid#837) New aardvark adapter with support for aliasing (prebid#875) Add Fidelity adapter (prebid#862) Adkernel adapter aliasing (prebid#857) 0.16.1-pre
Type of change
Description of change
Other information