Skip to main content

Measure Lightning Experience Performance and Experienced Page Time (EPT)

Learning Objectives

After completing this unit, you’ll be able to:

  • Add an EPT counter to Lightning Experience.
  • Use the Lightning Usage App to measure performance.
  • Create custom reports using Lightning Usage App objects.
  • Use Event Monitoring to measure performance.

How Performance Is Measured

Remember the last time you had to wait longer than expected for a web page to load? What felt like hours likely took just seconds (or maybe even milliseconds), but the time it takes a page to load can mean the difference between a great user experience and a flurry of support tickets. As you may recall from the previous unit, Experienced Page Time (EPT) is how Salesforce measures the time it takes to download and display the entire content of a webpage in a browser window. In other words, measuring EPT is really about ensuring your users get the best user experience possible. 

This is why Salesforce offers four ways to measure EPT.

  • Lightning Experience: Add an EPT counter to Lightning Experience.
  • Lightning Usage App: View aggregated page and browser performance.
  • Custom Reports: Build custom reports using Lightning Usage App objects.
  • Event Monitoring: Use event types to monitor performance.

Add an EPT Counter to Lightning Experience

One of the easiest ways to monitor Experienced Page Time is to add an EPT counter directly to Lightning Experience, which displays in the header. This addition will allow you to view page performance in real time. You can add an EPT counter to Lightning Experience in two ways. 

The first way is to enable Lightning Component Debug Mode from Setup. When this setting is enabled, it adds a counter to the Lightning Experience header that shows page load time and network bandwidth. One thing to keep in mind when enabling this setting is that performance may be impacted, because the component code won't be minified and caching is disabled.

Lightning Experience header with EPT and network bandwidth counters enabled.

The second way is to add the following string to the end of your Lightning Experience URL: ?eptVisible=1. This will add the page load time counter to your Lightning Experience header, but won’t display the network bandwidth. Unlike enabling Lightning Component Debug Mode, the component code is minified and there will be less impact on performance time.

Lightning Experience header with EPT counter enabled.

If you use either of these methods to measure EPT, make sure you don’t open a page in a new tab or manually reload a page, because it will measure the Lightning Framework bootstrap as part of the page load time and display a skewed view of the results. 

Use the Lightning Usage App to Measure EPT

If you’re an admin, you probably know that the Lightning Usage App is a great way to track adoption and usage of Lightning Experience. But did you know that you can also use it to get an overall view of how your pages are performing? 

To open the Lightning Usage App, click the App Launcher and search for Lightning Usage. Once it’s open, you can use the Activity and Usage sections to dig into your data. 

Let’s say you want to see how your org’s most viewed pages are performing. To do this, simply click Page in the Activity section and review the graph. In the example below, you can see that Feed Items and Chatter pages load quickly, while work records load more slowly. 

A view of the Page Performance tab in the Lightning Usage App.

You can also use the Lightning Usage App to see how browser performance affects EPT. In the example below, you can see that pages opened in the Salesforce mobile app loaded more quickly than pages loaded in desktop browsers.

A view of the Browser Performance tab in the Lightning Usage App.

When using the Lightning Usage App, keep in mind that you are seeing an aggregated view of page and browser performance. If you want to measure the EPT for a specific page, it might be best to add a counter directly to Lightning Experience using the methods discussed in the previous section.

Build Custom Reports Using Lightning Usage App Objects

If you want more fine-grained analysis of how your pages are performing, you can also use Lightning Usage App objects to create custom reports.

Let’s say you want to look at the performance of your most popular pages grouped by browser. To do this, the first step is to create a report type using the LightningUsageByBrowserMetrics object. Once the report type is created, you can then build your custom report using Report Builder. 

Monitor Performance with Event Monitoring

The last way to measure EPT is for those who have access to Event Monitoring. Event Monitoring is part of Salesforce Shield, and provides access to detailed performance, security, and usage data on all your Salesforce apps. If you want to learn more about Event Monitoring, check out the Event Monitoring badge on Trailhead. 

To measure page performance in Event Monitoring, use the Lightning Page View event type. The Lightning Page View event type tracks information such as the page a user visited, the browser they used, how long the user spent on the page, and the load time for the page. In the example below, you can see metrics for when a user accessed the page (“pageStartTime”), how long they spent on the page (“duration”), and the Experienced Page Time (“EPT”). 

{
  “version”: “v0.2”,
  “id”: “ltng:pageView”,
  “eventSource”: null,
  “ts”: 1513,
  “pageStartTime”: 1519916856108,
  “duration”: 836378,
  “ept”: 3430,
  “unixTS”: true,
  “clientSessionId”: a3f00dd8895cb6ce6767,
  “sequence”: 1,
  “attributes”: {
    “eptDeviation”: false,
    “perceivedEPT”: 2611,
    “cores”: 4,
    “backgroundTime”: 756936,
    “network”: {
      “downlink”: 9.55,
      “rtt”: 50,
},

You can also use different event types to monitor other aspects of performance. The following are just a few examples. 

  • Lightning Error Event Type. Represent errors that occurred during user interactions with Lightning Experience and the Salesforce mobile app.
  • Lightning Interaction Event Type. Track user actions in Lightning Experience and the Salesforce mobile app, such as the user clicking, tapping, or scrolling on a page.
  • Lightning Performance Event Type. Track trends in Lightning Experience and Salesforce mobile app performance.

As you can see, Salesforce makes it easy to measure page performance to ensure your users are getting a great user experience. Next, we look at some factors that can impact page performance, and how you can mitigate issues before they become support tickets.

Resources

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities