You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If native template has multi click links, then message: "Prebid Native" will get fired multi times, and it ends up bidWon event get fired multi times.
To Reproduce
Suppose there is a native template having following html:
both title and icon both are clickable.
With such html, the issue will happen.
Reason:
code fire native ad impression are:
function loadImpTrackers(adElements) {
for(var i = 0; i < adElements.length; i++){
let adId = readAdIdFromSingleElement(adElements[i]);
fireTracker(adId, 'impression');
}
}
if (adElements.length > 0) {
loadImpTrackers(adElements);
}
So the impression tracker get triggered for each <a> with pb-click class.
Suggest solution:
change loadImpTrackers so it only fires impress tracker for first element.
The text was updated successfully, but these errors were encountered:
wqi1972
changed the title
Bid won message get trigger multi times if native template has multi <a> tag
Bid won message get trigger multi times if native template has multi <a> tag
Apr 28, 2020
Describe the bug
If native template has multi click links, then
message: "Prebid Native"
will get fired multi times, and it ends upbidWon
event get fired multi times.To Reproduce
Suppose there is a native template having following html:
both title and icon both are clickable.
With such html, the issue will happen.
Reason:
code fire native ad impression are:
So the impression tracker get triggered for each
<a>
withpb-click
class.Suggest solution:
change
loadImpTrackers
so it only fires impress tracker for first element.The text was updated successfully, but these errors were encountered: