Skip to content

Commit

Permalink
Call trigger event on DOMContentLoaded
Browse files Browse the repository at this point in the history
  • Loading branch information
kaedroho committed Jul 15, 2021
1 parent cfff165 commit 7631e60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wagtail_ab_testing/static/wagtail_ab_testing/js/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
};

// Trigger visit page event
window.wagtailAbTesting.triggerEvent('visit-page');
document.addEventListener('DOMContentLoaded', function() {
window.wagtailAbTesting.triggerEvent('visit-page');
});
}
})();

0 comments on commit 7631e60

Please sign in to comment.