Skip to content

Commit

Permalink
Nativo Bid Adapter: change QS param referrer value (prebid#9083)
Browse files Browse the repository at this point in the history
* Initial nativoBidAdapter document creation (js, md and spec)

* Fulling working prebid using nativoBidAdapter. Support for GDPR and CCPA in user syncs.

* Added defult size settings based on the largest ad unit. Added response body validation. Added consent to request url qs params.

* Changed bidder endpoint url

* Changed double quotes to single quotes.

* Reverted package-json.lock to remove modifications from PR

* Added optional bidder param 'url' so the ad server can force- match an existing placement

* Lint fix. Added space after if.

* Added new QS param to send various adUnit data to adapter endpopint

* Updated unit test for new QS param

* Added qs param to keep track of ad unit refreshes

* Updated bidMap key default value

* Updated refresh increment logic

* Refactored spread operator for IE11 support

* Updated isBidRequestValid check

* Refactored Object.enties to use Object.keys to fix CircleCI testing errors

* Updated bid mapping key creation to prioritize ad unit code over placementId

* Added filtering by ad, advertiser and campaign.

* Merged master

* Added more robust bidDataMap with multiple key access

* Deduped filer values

* Rolled back package.json

* Duped upstream/master's package.lock file ... not sure how it got changed in the first place

* Small refactor of filterData length check. Removed comparison with 0 since a length value of 0 is already falsy.

* Added bid sizes to request

* Fixed function name in spec. Added unit tests.

* Added priceFloor module support

* Added protection agains empty url parameter

* Changed ntv_url QS param to use referrer.location instead of referrer.page

* Removed testing 'only' flag
  • Loading branch information
jsfledd authored and JacobKlein26 committed Feb 8, 2023
1 parent 899fb32 commit 9a0957c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/nativoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const spec = {
'params.url',
)
if (pageUrl == undefined || pageUrl === '') {
pageUrl = bidderRequest.refererInfo.page
pageUrl = bidderRequest.refererInfo.location
}

placementId = deepAccess(bidRequest, 'params.placementId')
Expand Down
15 changes: 13 additions & 2 deletions test/spec/modules/nativoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,23 @@ describe('nativoBidAdapterTests', function () {
expect(request.url).to.include('ntv_pas')
})

it('ntv_url should contain query params', function () {
const request = spec.buildRequests(bidRequests, {
bidderRequestId: 123456,
refererInfo: {
location: 'https://www.test.com?queryTest=true',
},
})
console.log(request.url) // eslint-disable-line no-console
expect(request.url).to.include(encodeURIComponent('?queryTest=true'))
})

it('ntv_url parameter should NOT be empty even if the utl parameter was set as an empty value', function () {
bidRequests[0].params.url = ''
const request = spec.buildRequests(bidRequests, {
bidderRequestId: 123456,
refererInfo: {
referer: 'https://www.test.com',
location: 'https://www.test.com',
},
})

Expand All @@ -144,7 +155,7 @@ describe('nativoBidAdapterTests', function () {
const request = spec.buildRequests(bidRequests, {
bidderRequestId: 123456,
refererInfo: {
referer: 'https://www.test.com',
location: 'https://www.test.com',
},
})

Expand Down

0 comments on commit 9a0957c

Please sign in to comment.