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

Telaria Bid Adapter: add adCode & srcPageUrl query string param only once. #4833

Merged
merged 2 commits into from
Feb 10, 2020

Conversation

vseventer
Copy link
Contributor

@vseventer vseventer commented Feb 7, 2020

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

This PR fixes a bug where the Telaria bid adapter includes the adCode and srcPageUrl 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

{
  bidder: 'telaria',
  params: {
    supplyCode: 'test-supply-code',
    adCode: 'test-ad-code',
    srcPageUrl: 'http://www.example.com'
}

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 a srcPageUrl query string parameter containing document.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.

@vseventer vseventer changed the title Telaria Bid Adapter: add srcPageUrl query string param only once. Telaria Bid Adapter: add adCode & srcPageUrl query string param only once. Feb 7, 2020
Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

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

LGTM

@jsnellbaker jsnellbaker merged commit 462583a into prebid:master Feb 10, 2020
hellsingblack pushed a commit to SublimeSkinz/Prebid.js that referenced this pull request Mar 5, 2020
…once. (prebid#4833)

* Set srcPageUrl only once.

* Set adCode only once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants