prebid / Prebid.js

Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.
https://docs.prebid.org
Apache License 2.0
1.31k stars 2.08k forks source link

Getting incorrect value for refererlURl in bidRequest.referelInfo #3671

Closed pm-manasi-moghe closed 5 years ago

pm-manasi-moghe commented 5 years ago

If we redirect from a page A to another page B, which requires the refererlUrl (which in this case is location of page A), the referer info set in bidderRequest still returns the location of page B. At the line https://github.com/prebid/Prebid.js/blob/b46e0b59647afae5e596b73a29283a6a28e8048e/src/refererDetection.js#L71 , we are setting the detectedRefererUrl to frameLocation. Since the length of levels array is 1, detectedRefererUrl is never updated again and hence incorrectly set to the frameLocation.

Is this the expected behaviour?

pm-harshad-mane commented 5 years ago

The documentation here at http://prebid.org/dev-docs/bidder-adaptor.html#referrers mentions that Referrer information is included on the bidderRequest.refererInfo property. This property contains the following parameters: referer: a string containing the detected top-level URL. I think parameter name, referer, is confusing here

jsnellbaker commented 5 years ago

@jaiminpanchal27 Can you take a look?

pm-harshad-mane commented 5 years ago

Hello @jaiminpanchal27 ,

Could you please help us with the issue?

jaiminpanchal27 commented 5 years ago

@pm-manasi-moghe @pm-harshad-mane Can you share the test page or jsfiddle. I can switcheroo to debug your page. Also if you are in cross domain iframe, you won't be able to reach to the top.

pm-harshad-mane commented 5 years ago

Hello @pm-manasi-moghe , Can you share a test page?

pm-manasi-moghe commented 5 years ago

1) Test page that redirects to the landing page - https://jsfiddle.net/bocujghm/ 2) Landing page with prebidjs that makes a call to endpoint and passes the referer url in "site.ref" - https://jsfiddle.net/7ywec8o2/

Uses latest prebid.js

stale[bot] commented 5 years ago

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.

pm-manasi-moghe commented 5 years ago

Hi @jaiminpanchal27,

Were you able to use the test pages? Any update on this?

stale[bot] commented 5 years ago

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.