Is it possible to check on webpage loading time and speed using the default “Page View” event?
Hi Sharon L., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> 👋
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Yes, it is possible to check webpage loading time and speed using the default "Page View" event in Mixpanel, but with some caveats.By default, Mixpanel's JavaScript SDK can automatically track page views when you enable the track_pageview
configuration option. However, the default page view event doesn't automatically include loading time or speed metrics.According to the Mixpanel documentation on sending events, the default page view event is named $mp_web_page_view
and includes properties like page title, URL components, and marketing parameters. It doesn't mention any built-in performance metrics.However, you can add custom properties to the page view event to include loading time information. For example, you could measure the page load time yourself and add it as a custom property when tracking the page view.Here's an example of how you might do this: LBKSmixpanel.track_pageview({ "load_time_ms": performance.now() // Add load time as a custom property });LBKS
This approach is supported by an example in the Mixpanel documentation on Cart Analysis, which mentions: "While wider page view tracking gives broader analysis, our new Cart Analysis feature enables deeper analysis. This enhancement allows you to view the items in a user's cart at specific moments in their purchase journey (view product, add to cart, purchase) and track details about these items, like their category, brand, and price."This suggests that you can add custom properties to page view events to track additional details.For more precise and automatic performance tracking, you might want to consider using Mixpanel's Autocapture feature or implementing custom event tracking for performance metrics. The Mixpanel Autocapture documentation mentions that it can capture more detailed information about page interactions, though it doesn't specifically mention performance metrics.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.