ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

How to track pageviews and other events

Single-page-apps

In SPAs you need to call the following method to track every page view:

window.MeiroEvents.track("pageView", {referrer: "https://example.com/previous" });

The second object parameter is optional, you can pass additional data to the event payload.