Telaria Bid Adapter: add adCode & srcPageUrl query string param only once. #4833
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Description of change
This PR fixes a bug where the Telaria bid adapter includes the
adCode
andsrcPageUrl
query string parameters twice if added to the bidder params.For example, the configuration below makes a request to (note
&srcPageUrl=...
is included twice):https://test-supply-code.ads.tremorhub.com/ad/tag?adCode=test-ad-code&playerWidth=640&playerHeight=360&srcPageUrl=http://www.example.com&supplyCode=test-supply-code&adCode=test-ad-code&srcPageUrl=http://www.example.com&transactionId=5c5234a0-efc9-41a2-810d-defb5323c76e&referrer=http%3A%2F%2Fwww.example.com%2Freferer%2F&hb=1&fmt=json
This PR fixes this issue, and only embeds
srcPageUrl
once:https://test-supply-code.ads.tremorhub.com/ad/tag?adCode=test-ad-code&playerWidth=640&playerHeight=360&srcPageUrl=http://www.example.com&supplyCode=test-supply-code&transactionId=5c5234a0-efc9-41a2-810d-defb5323c76e&referrer=http%3A%2F%2Fwww.example.com%2Freferer%2F&hb=1&fmt=json
Note that, if
params.srcPageUrl
is not defined, the current default behavior applies (i.e. adding asrcPageUrl
query string parameter containingdocument.location.href
).params.adCode
is a required field.Other information
I had to update the Telaria tests to return a new stub object every time in order to make the tests idempotent.