Skip to content
Permalink
Browse files

Update owa.tracker.js (#410)

Move the clearInterval above the iframe data push to prevent race conditions where duplicate data gets logged/tracked.
  • Loading branch information...
criterion9 authored and padams committed Jul 29, 2019
1 parent 61f5572 commit 9322ee8673f034088ee965f9a5592f2559c40a3b
Showing with 3 additions and 2 deletions.
  1. +3 −2 modules/base/js/owa.tracker.js
@@ -930,8 +930,9 @@ OWA.tracker.prototype = {
var doc = that.getIframeDocument( iframe );

if ( doc ) {
clearInterval(timer); //clear the interval before submitting data, race condition could occur otherwise resulting in duplicate tracked events
that.postFromIframe(iframe, data);
clearInterval(timer);

}


@@ -2350,4 +2351,4 @@ OWA.tracker.prototype = {
window['owa_cmds'] = q;
window['owa_cmds'].process();
}
})();
})();

0 comments on commit 9322ee8

Please sign in to comment.
You can’t perform that action at this time.