-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Overriding referrer: publisherDomain vs pageUrl #5637
Comments
Requested not to be used at https://github.com/prebid/Prebid.js/pull/5674/files#r480260677 |
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. |
Current plan is to copy over pageURL for current 6 adapters, will also explore a utility function that copies one value to the other, also for docs :
|
@jbartek25 - why do you say "The doc falsely claims"? I just made two test pages that show pageUrl does in fact get passed to both client and server adapters. That said, I fixed a couple of annoying typos in that section. |
@bretg You are right in that the |
Hmm. That's a problem. What's supposed to happen is that it overrides the bidrequest refererinfo. Anyhow, I tweaked the docs to make this an unappealing feature as it works only for some bidders. prebid/prebid.github.io#2864 |
@bretg thank you |
relevant deprecation addressed in #6591, we need to alter the relevant adapters that consume this. Need a separate PR to alter these adapters, raising at 5.0 meeting |
I see several more adapters than avocet and readpeak using this including synacor, adwmg, interactiveoffers, adyoulike, and apacdex. I also see an issue with a test on test/spec/config_spec.js |
I believe
|
Hi @dgirardi The 'referer' field is the "detect top url". So with cross-domain iframes, it'll be the top-most accessible window's I must admit, the chosen name 'referer' is confusing. I kinda agree with @robertrmartinez #8294 (comment) It'll be nice to have the page referer (may be called function getTopWindowReferrer() {
try {
return window.top.document.referrer;
} catch (e) {
return '';
}
} This implementation makes more sense than his example. |
it seems this could just be presented to adapters on ortb2.site.page and ortb2.site.ref without requiring looking at referInfo ? |
After working on it for a while, here's what I am actually doing:
@philipwatson, you are correct - I was not aware that iframes have their |
I would like to see an analysis of use-cases and what value each attribute would have in that scenario. e.g.
|
So for scenarios 1 and 2 you have the right values. In all cases, if 3:
4:Same scenario as 3, but from a webkit browser. Webkit makes the origin of cross-origin frames available. (Origin is not exactly the same as the URL, but we pick it up nonetheless). If the actual publisher page is at "www.example.com/article", in Chrome the values are
5:AMP. I do not know how it works, but Prebid's frame has a global
6.Nested in-frame navigation. I don't know if/how this happens in the real world, but if prebid lives inside a navigable cross-origin iframe, then most values would be incorrect. If example.com serves a page with
This is because when we find the top-most accessible frame, we assume that the referrer to it was the parent frame. That heuristic fails if any navigation happens within frames. |
7:Like example #1, prebid lives directly under example.com. But the user gets to it from Google. then the values are
That is, |
Description
We have two overlapping ways for publishers to override the results of Prebid's attempt to derive the page's URL that's stored in bidderRequest.refererInfo as described in https://docs.prebid.org/dev-docs/bidder-adaptor.html#referrers
Another use case here is that the publisher may want to suppress the full page URL from bidders.
I'd like to propose that we fix this in 6.0:
Here are the two current
setConfig
options:publisherDomain
As documented at https://docs.prebid.org/dev-docs/publisher-api-reference.html#setConfig-Publisher-Domain
Set the publisher’s domain where Prebid is running, for cross-domain iframe communication:
This is used by the avocet and readpeak adapters, but they appear to expect the value to be "example.com" rather than "https://example.com"
pageUrl
There is a setConfig value used by 16 adapters in addition to the refererInfo object or as an override.
e.g.
The text was updated successfully, but these errors were encountered: