Make sure info about versions is included for cached events

This commit modifies trackCachedEvents() to call track() instead of window.mixpanel.track().

This is needed to make sure that we include information about the free
and premium versions (which is done inside track()) for cached events
(events that were added before mixpanel loaded).

[MAILPOET-3885]
This commit is contained in:
Rodrigo Primo
2021-11-10 16:30:44 -03:00
committed by Veljko V
parent b4b1546a54
commit 34ef9fcbbf

View File

@@ -50,7 +50,7 @@ function exportMixpanel() {
function trackCachedEvents() {
eventsCache.forEach(function trackIfEnabled(event) {
if (window.mailpoet_analytics_enabled || event.forced) {
window.mixpanel.track(event.name, event.data);
track(event.name, event.data);
}
});
}