Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TripleliftBidAdapter - remove dependency on getTopWindowLocation util #3139

Merged
merged 8 commits into from
Nov 7, 2018
7 changes: 5 additions & 2 deletions modules/tripleliftBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ export const tripleliftAdapterSpec = {

buildRequests: function(bidRequests, bidderRequest) {
let tlCall = STR_ENDPOINT;
let referrer = utils.getTopWindowUrl();
let data = _buildPostBody(bidRequests);

tlCall = utils.tryAppendQueryString(tlCall, 'lib', 'prebid');
tlCall = utils.tryAppendQueryString(tlCall, 'v', '$prebid.version$');
tlCall = utils.tryAppendQueryString(tlCall, 'referrer', referrer);

if (bidderRequest && bidderRequest.refererInfo) {
let referrer = bidderRequest.refererInfo.referer;
tlCall = utils.tryAppendQueryString(tlCall, 'referrer', referrer);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks good but should add a unit test.


if (bidderRequest && bidderRequest.timeout) {
tlCall = utils.tryAppendQueryString(tlCall, 'tmax', bidderRequest.timeout);
Expand Down
2 changes: 0 additions & 2 deletions test/spec/modules/tripleliftBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ describe('triplelift adapter', function () {
expect(url).to.match(/(?:tlx.3lift.com\/header\/auction)/)
expect(url).to.match(/(?:lib=prebid)/)
expect(url).to.match(/(?:prebid.version)/)
// expect(url).to.match(/(?:fe=)/) //
expect(url).to.match(/(?:referrer)/)
})
});

Expand Down