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

Prebid Core: native puc multiple events fix #7543

Merged
merged 2 commits into from
Oct 20, 2021

Conversation

FilipStamenkovic
Copy link
Contributor

Type of change

  • Bugfix

Description of change

Fire bidWon and impression tracker only once.

Current implementation will fire bidWon and impression tracker multiple times when native is being render with PUC.
PBJS will do that because it's firing events each time PUC sends post message. And PUC is sending 3 post messages when native ad is being rendered:

  • request all assets
  • resize container height
  • fire native tracker

PUC code: https://github.com/prebid/prebid-universal-creative/blob/master/src/nativeRenderManager.js#L67-L69

Proposed fix will fire onBidWon and impression tracker only when PUC sends 'fireNativeTracker' post message.

This PR resolves #7526 issue.

@ChrisHuie ChrisHuie changed the title Native puc multiple events fix Prebid Core: native puc multiple events fix Oct 12, 2021
@ChrisHuie ChrisHuie self-requested a review October 12, 2021 15:21
@ChrisHuie ChrisHuie self-assigned this Oct 12, 2021
@ChrisHuie ChrisHuie requested a review from Fawke October 12, 2021 15:21
@Fawke Fawke merged commit f1c5abd into prebid:master Oct 20, 2021
@FilipStamenkovic FilipStamenkovic deleted the native_puc_multiple_events_fix branch October 20, 2021 12:36
cpabst pushed a commit to sovrn/Prebid.js that referenced this pull request Jan 10, 2022
* fire bidWon and impression tracker only once

* add special test case for 'fireNativeTrackers'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate bidWon event fired when native + universal-creative is used 🐛
3 participants