Leveraging Lightning Usage Metrics for Change Management
Change management is one of the main key success factors in any Salesforce project. How do you track adoption? How do you ensure that Salesforce users follow your new process? In this blog post, I’ll show how to query the “LightningUsageByPageMetrics” object to get some insights about user adoption.
I recently implemented a project that involved the usage of a new custom object. Despite your emails, Slack posts, videoconferences, and live training sessions, a significant part of Salesforce users won’t be receptive to your new Salesforce project / process. It’s just quite hard to get change management right. I believe that having executive sponsorship can make the difference between success and failure.
By giving insights to your executive sponsors, you’ll help them pushing your new processes to their teams. In my case, I wanted to know which team and which user use my new custom object, and whether adoption was rising or not.
Lightning Usage Objects
The answer is this object: LightningUsageByPageMetrics. Salesforce created a bunch of lighting usage objects in the Summer 18’ release. Here’s the list and their definitions.
- LightningUsageByAppTypeMetrics
- Represents number of users on Lightning Experience and Salesforce Mobile.
- LightningUsageByBrowserMetrics
- Represents Lightning Experience usage grouped by user’s browser.
- LightningUsageByFlexiPageMetrics
- Represents custom pages users viewed most frequently in Lightning Experience.
- LightningUsageByPageMetrics
- Represents standard pages users viewed most frequently in Lightning Experience.
To query this object, open Workbench here: https://workbench.developerforce.com/select.php, and navigate to queries > SOQL queries. Jump to SOQL Query and select the LightningUsageByPageMetrics object as shown here below.
You can take a look at this page to understand each field: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_lightningusagebypagemetrics.htm
As you can see, these four fields in this query store the main information available in this object. Hence, you could start exploring adoption data with this simple query:
SELECT MetricsDate,PageName,TotalCount,UserId FROM LightningUsageByPageMetrics
In my case, I wanted information about teams and users, and how it evolved by month. Thus, I changed the query a bit:
SELECT MetricsDate,PageName,TotalCount,User.Name, User.UserRole.Name FROM LightningUsageByPageMetrics
Select the view as = Bulk CSV in order to open the data with Excel for instance.
Create an Excel Pivot Table to analyze the data
With your Excel Data, you can add a table and create a pivot table. In my case, I added a filter : PageName = “MyCustomObjectName__c Record”.
Finally, I just added a Pivot Table chart to track the adoption over time for a specific user role.
Looking at this chart (mid-November), I was confident my project gained traction. I also checked the adoption by users to see which user followed the new process. With this insight, managers with large teams can communicate on change management data and suggest additional coaching for users that didn’t have the chance to get it right the first time.
Hi, thanks so much for this information. I created a report using the information you provided, but I cannot use it because the data seems off. Can you please help. I am trying to track how many people are viewing a custom lightning app page. It is called Marketing_Campaign. I logged in as 6 different people during off hours over the span of 3 days and then ran the report the next days. The only page that they all, but one, had in common was a page called Lighnting:LightningSales. I don’t understand why that is name of the page, but I am pretty confident that this page name refers to the Marketing_Campaign page, and I can work with that. What I don’t understand is that the one User never shows as accessing the page, but it shows a page called “unknow unknown”. When I run a report on all users viewing the “unknow unknown”, it is clear that this does not solely relate to the Marketing_Campaign app. Why is this happening?