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

PubMatic to execute tracker pixel in iframe. #937

Merged
merged 10 commits into from
Feb 1, 2017
Merged

PubMatic to execute tracker pixel in iframe. #937

merged 10 commits into from
Feb 1, 2017

Conversation

pm-harshad-mane
Copy link
Contributor

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
  • Other

Description of change

PubMatic impression tracker pixel needs to be executed in iframe to avoid multiple times execution.
So we have added a new function createTrackPixelIframeHtml in utils and have used the same in PubMatic adapter.

Other information

@mkendall07 mkendall07 self-assigned this Jan 23, 2017
@mkendall07 mkendall07 added this to the Prebid 0.19.0 milestone Jan 23, 2017
@pm-harshad-mane
Copy link
Contributor Author

Hello @mkendall07 ,

Do you need anything from me for code-review ?

@mkendall07
Copy link
Member

@pm-harshad-mane
Can you explain the need for the iframe vs image embed? I don't see the difference here.

src/utils.js Outdated
return '';
}

return '<iframe frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0p;width:0p;display:none;" scrolling="no" src="' + encodeURI(url) + '"></iframe>';
Copy link
Member

Choose a reason for hiding this comment

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

@pm-harshad-mane
Copy link
Contributor Author

Hello @mkendall07 ,

Agree with you that there is no much difference in executing a pixel in an image tag or an iframe tag.
But in our past-experience we have observed some discrepancies in case when our tracker call is executed in image tag as image tag with zero byte content reloads in some cases.
So at PubMatic we recommend to execute our tracker call in an iframe tag than image tag.

@mkendall07
Copy link
Member

Thanks. LGTM.

@mkendall07 mkendall07 merged commit e9be4fe into prebid:master Feb 1, 2017
@pm-harshad-mane
Copy link
Contributor Author

Thank you @mkendall07

Walexander pushed a commit to MbidIO/Prebid.js that referenced this pull request Mar 6, 2017
* PubMatic: passing pageurl in postbid

added support to pass pageURL to PubMatic adapter in postbid (Safeframe) implementation
please note that we have not added safe frame detection logic

* removed code committed accidently in master

* new function createTrackPixelIframeHtml in util

* minor fix in return statement of createTrackPixelIframeHtml

* PubMatic to execute impression tracker in iframe

will use utils.createTrackPixelIframeHtml instead of
utils.createTrackPixelHtml

* utils.createTrackPixelIframeHtml: using string template literals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants