Mixpanel Community Icon

Measuring Website Performance with Mixpanel: Tracking TTI Metrics

·
·

What's the best way to measure website performance using Mixpanel? I have a widget that takes some time to load, so ideally I would want some TTI metric. Would it be possible to send an event on page open, send an event once done loading, and then create a historical report on the time between these events?

  • Avatar of Eric N.
    Eric N.
    ·
    ·

    Yes, that is possible and while not a property itself, Mixpanel provides a method to track the time it takes for an action to occur. You can use the .timeEvent() method to mark the start of an action and then use .track() to end the timing. The duration will be automatically recorded in the “Duration” property. For example, in React Native:

    // start the timer for the event "Image Upload"
    mixpanel.timeEvent("Image Upload");
     
    // 20 seconds later...
     
    // track "Image Upload" event
    // "Duration" event property set to 20
    mixpanel.track("Image Upload");