-
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
PubMatic to execute tracker pixel in iframe. #937
Conversation
added support to pass pageURL to PubMatic adapter in postbid (Safeframe) implementation please note that we have not added safe frame detection logic
will use utils.createTrackPixelIframeHtml instead of utils.createTrackPixelHtml
Hello @mkendall07 , Do you need anything from me for code-review ? |
@pm-harshad-mane |
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>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use string template literals here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
Hello @mkendall07 , Agree with you that there is no much difference in executing a pixel in an image tag or an iframe tag. |
Thanks. LGTM. |
Thank you @mkendall07 |
* 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
Type of change
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