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

iOS Referrer fix #996

Merged
merged 5 commits into from
Mar 7, 2017
Merged

iOS Referrer fix #996

merged 5 commits into from
Mar 7, 2017

Conversation

ckbo3hrk
Copy link
Contributor

Type of change

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)

Description of change

  1. Implemented srcdoc ad rendering appoach as suggested in Missing http-referrer for img tracking pixels on iOS #977 (comment) for all browsers that support iframe.srcdoc property except Firefox as it doesn't send proper http referrer for such approach.
  2. Fixed url.parse function to initialize pathname property in uniform way for all browsers (with leading /. Current version set pathname without leading / on IE11)

@ckbo3hrk ckbo3hrk changed the title Referrer fix iOS Referrer fix Feb 24, 2017
@mkendall07 mkendall07 self-assigned this Mar 1, 2017
@mkendall07
Copy link
Member

@ckbo3hrk
Can you add a unit test that asserts for the url.parse leading / change?

@ckbo3hrk
Copy link
Contributor Author

ckbo3hrk commented Mar 6, 2017

@mkendall07 I've changed the existing one to cover url.parse changed behaviour

src/prebid.js Outdated
* Check if parent iframe of passed document supports content rendering via 'srcdoc' property
* @param {HTMLDocument} doc document to check support of 'srcdoc'
*/
function isSrcdocSupported(doc) {
Copy link
Member

Choose a reason for hiding this comment

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

can you move into utils.js please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@mkendall07
Copy link
Member

LGTM. Thanks!

@mkendall07 mkendall07 merged commit de8bc31 into prebid:master Mar 7, 2017
outoftime pushed a commit to Genius/Prebid.js that referenced this pull request Mar 20, 2017
* fixed leading / omission on ie11

* srcdoc rendering approach to avoid http-referrer omission prebid#977

* missing unit test for url.parse (leading slash in pathname)

* move isSrcdocSupported to utils
outoftime pushed a commit to Genius/Prebid.js that referenced this pull request Mar 20, 2017
…built

* 'master' of https://github.com/prebid/Prebid.js:
  Add GourmetAds AppNexus Alias (prebid#1057)
  fix issue calling `requestBids();` (prebid#1058)
  explicit win url response format as pixel (prebid#1001)
  OpenX Adapter: Correctly gets the page domain for cross-domain iframes (prebid#1027)
  better http/s support (prebid#1010)
  Add a new generated field transactionId to each adunits. (prebid#1040)
  Update readme (prebid#1053)
  PulsePoint Lite adapter (prebid#1016)
  Add new adapter ServerBid (by Adzerk) (prebid#1024)
  Fix Mantis tests in negative timezone (prebid#1049)
  Add deal id handling (prebid#1044)
  sanitize bidderRequest to rubicon adapter to ensure accountId is sent (prebid#1030)
  Bidfluence Adapter (prebid#1023)
  Update uglify-js version (prebid#1041)
  Add dev dependencies.
  hb_adid should be uppercase in all cases (prebid#1037)
  Add TapSense Header Bidding Adapter and tests (prebid#1004)
  iOS Referrer fix (prebid#996)
  Change identification of JavaScript user matching (prebid#1022)
  Fixed mixed tabs/spaces in wideorbit adapter (prebid#1031)
doc.write(ad);
doc.close();
if (isSrcdocSupported(doc)) {
doc.defaultView.frameElement.srcdoc = ad;
Copy link
Member

Choose a reason for hiding this comment

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

It looks like srcdoc completely wipes out any other content present in the iframe. This is causing DFP to fail to report on viewable impressions. I will be reverting this change until we can find a proper solution.

Copy link
Member

Choose a reason for hiding this comment

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

@ckbo3hrk fyi

Copy link
Contributor Author

@ckbo3hrk ckbo3hrk Apr 18, 2017

Choose a reason for hiding this comment

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

@mkendall07, I'd like to investigate this bug. Could you please provide me a sample dfp tag to reproduce this issue ?

Copy link
Member

@mkendall07 mkendall07 Apr 18, 2017

Choose a reason for hiding this comment

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

@ckbo3hrk
Here is an example:
Working (filter by "activeview" in network)
[working updating links]
Not working:

dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* fixed leading / omission on ie11

* srcdoc rendering approach to avoid http-referrer omission prebid#977

* missing unit test for url.parse (leading slash in pathname)

* move isSrcdocSupported to utils
@ckbo3hrk ckbo3hrk deleted the referrer_fix branch November 26, 2024 14:56
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