diff --git a/modules/tripleliftBidAdapter.js b/modules/tripleliftBidAdapter.js index 3fdabcfa6d2..7f6ec90c7b9 100644 --- a/modules/tripleliftBidAdapter.js +++ b/modules/tripleliftBidAdapter.js @@ -29,7 +29,7 @@ export const tripleliftAdapterSpec = { tlCall = tryAppendQueryString(tlCall, 'v', '$prebid.version$'); if (bidderRequest && bidderRequest.refererInfo) { - let referrer = bidderRequest?.refererInfo?.topmostLocation || bidderRequest?.refererInfo?.page; + let referrer = bidderRequest.refererInfo.page; tlCall = tryAppendQueryString(tlCall, 'referrer', referrer); } diff --git a/test/spec/modules/tripleliftBidAdapter_spec.js b/test/spec/modules/tripleliftBidAdapter_spec.js index 4cab8be7e09..5cfa64184f9 100644 --- a/test/spec/modules/tripleliftBidAdapter_spec.js +++ b/test/spec/modules/tripleliftBidAdapter_spec.js @@ -979,19 +979,12 @@ describe('triplelift adapter', function () { expect(url).to.match(new RegExp('(?:' + prebid.version + ')')) expect(url).to.match(/(?:referrer)/); }); - it('should prioritize topmostLocation for referrer', function () { - bidderRequest.refererInfo.topmostLocation = 'https://topmostlocation.com?foo=bar' + it('should use refererInfo.page for referrer', function () { + bidderRequest.refererInfo.page = 'https://topmostlocation.com?foo=bar' const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest); const url = request.url; expect(url).to.match(/(\?|&)referrer=https%3A%2F%2Ftopmostlocation.com%3Ffoo%3Dbar/); - delete bidderRequest.refererInfo.topmostLocation - }); - it('should fall back to page for referrer if topmostLocation is unavailable', function () { - bidderRequest.refererInfo.topmostLocation = null - const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest); - const url = request.url; - expect(url).to.match(/(\?|&)referrer=https%3A%2F%2Fexamplereferer.com/); - delete bidderRequest.refererInfo.topmostLocation + delete bidderRequest.refererInfo.page }); it('should return us_privacy param when CCPA info is available', function() { bidderRequest.uspConsent = '1YYY';