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

Feature to make top page URL available to any included adapters #1882

Closed
tomraa opened this issue Nov 24, 2017 · 4 comments
Closed

Feature to make top page URL available to any included adapters #1882

tomraa opened this issue Nov 24, 2017 · 4 comments
Labels

Comments

@tomraa
Copy link
Contributor

tomraa commented Nov 24, 2017

Type of issue

feature request

Description

Different bidders' adapters use different techniques to get the current page URL for including in requests for bids to their own systems. When pbjs is delivered in an iframe, some adapters will pick up the iframe URL rather than the top page URL, which the server may not be expecting.

A useful feature would be to support a pbjs property which the adapters could check to see if the developer has set an override page URL to use. For example:

let pageUrlToUse = pbjs.previouslySetOverride || window.location.href

@bretg
Copy link
Collaborator

bretg commented Nov 25, 2017

How about we do this just by estabishing a convention for setConfig()? The page could call setConfig with a well-known attribute. e.g.

pbjs.setConfig(pageUrl: PAGE_URL_OVERRIDE);

Adapters could be modified to look for this attribute:

let pageUrlToUse = config.getConfig("pageUrl") || window.location.href

This would involve no code changes, just an update to the publisher and adapter documentation.

@tomraa
Copy link
Contributor Author

tomraa commented Nov 28, 2017

@bretg yes that would be good. I am doing something like this already for one bidder, but want to avoid having to maintain local customised versions of every adapter to use an override page URL if the bidder doesn't recognise the iframe URL. If it was an established feature/convention, the adapters here could be updated to use it when the publisher wants to provide it.

bretg added a commit to prebid/prebid.github.io that referenced this issue Jan 19, 2018
Related to prebid/Prebid.js#1882

We also need to add this convention to a general setConfig reference.
@bretg
Copy link
Collaborator

bretg commented Jan 30, 2018

@mkendall07 - we're planning to make this change in the Rubicon Project adapter over the coming couple of weeks, but that's just one of 70-odd bidAdapters in the modules directory. Any ideas for encouraging others to make this a convention that enough adapters use so pubs start using it?

One option would be to just make the change ourselves. Not sure there's precedence for that kind of broad edit. Another would be to make use of the email addresses in the module .md files.

bretg added a commit to prebid/prebid.github.io that referenced this issue Feb 27, 2018
Related to prebid/Prebid.js#1882

We also need to add this convention to a general setConfig reference.
@stale
Copy link

stale bot commented Mar 6, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 6, 2018
@stale stale bot closed this as completed Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants