As an ISV, your success doesn’t simply stop at another sale or customer installation. What’s equally as important is the growth of your business throughout the entire lifecycle of your product. There are powerful tools that make you successful: measuring adoption with every upgrade or new release of your application, reducing customer attrition, and essentially knowing how to innovate and improve your application to continuously meet the needs of your customers.
Certain questions are top of mind when it comes to your application – Which of my custom objects and Visualforce pages are being utilized the most? Are there certain objects or pages that can be deprecated or removed? Who are my most active customers? Is there a clear, visible pattern of growth and decay over time? These are questions that you previously had little-to-no insight into, but now, with our rollout of the Usage Metrics pilot, you can easily find the answers to.
In this blog post, we’ll share the ins and outs of the new pilot feature and how you can best leverage it to generate useful analytic data that provides wider visibility into your business.
What’s included in this new feature?
Usage Metrics gives you the ability to look deeper into customer usage of your application. With the Spring ‘14 release, the Usage Metrics pilot provides an API that exposes two things:
- Custom objects: the number of records stored in each custom object
- Visualforce pages: the number of times each Visualforce page was accessed, the number of unique users who accessed it, and the average loading time (in milliseconds)
Visibility is only granted into metadata owned by your namespace (as in, your application’s custom objects and Visualforce pages). Standard Objects (Accounts, Contacts, etc…) are not part of the Usage Metrics pilot functionality.
We added a new standard object called MetricsDataFile, which includes a myriad of information, including – but not limited to –
- MetricsDataFile (Yes, this field has the same name as the standard object. It contains the usage data)
- MetricsType (Either Custom Object or Visualforce)
- MetricsStartDate (Date when metrics are gathered)
- NamespacePrefix (Your application name)
(For the full schema of this object, please see the Spring ’14 Release Notes)
What’s contained in the usage data?
Once the Usage Metrics feature is activated, two new records are created per Salesforce instance, per day: one for all custom objects and one for all Visualforce pages. The usage data for each day and instance is stored as a text file, encoded in Base 64, in the MetricsDataFile field of the record. When decoded, the usage data looks like the comma-separated values below:
“00DD00000007LBA”,”Customer A”,”Enterprise Edition”,”TRIAL”,”Alpha”,”14″
“00DD00000007MCp”,”Customer B”,”Enterprise Edition”,”TRIAL”,”Beta”,”4″
“00DD00000007NEL”,”Customer C”,”Enterprise Edition”,”TRIAL”,”Delta”,”1”
“00DD00000007LBA”,”Customer A”,”Enterprise Edition”,”TRIAL”,”/apex/ReleaseSpring14__pageFour”,”1″,”1”,”78.0”
“00DD00000007MCp “,”Customer B”,”Enterprise Edition”,”TRIAL”,”/apex/ReleaseSpring14__pageOne”,”2″,”1”,”68.0”
“00DD00000007NEL “,”Customer C”,”Enterprise Edition”,”TRIAL”,”/apex/ReleaseSpring14__pageThree”,”1”,”1”,”80.5”
The format, decoded, is:
Organization ID, organization name, edition, status, resource (either the Visualforce page name or custom object developer name), count (either the number of times that the Visualforce page was accessed in the last day, or the total number of this custom object in use), [number of unique users who accessed the Visualforce page], [average load time of the Visualforce page in milliseconds]
Where is all of this data stored?
In order to enable Usage Metrics, you need to designate a specific organization to which the usage data is delivered on a daily basis. This is called the Reporting organization. Environment Hub is the other required component to enable Usage Metrics. Your Release organization(s) – the Development Edition organization(s) used to upload your package(s) – and Reporting organization must be members of the same Environment Hub. This is to ensure that the system isn’t delivering Usage Metrics to an organization outside of your dedicated ecosystem. For instructions on setting up Environment Hub and connecting organizations to it, refer to the ISVforce Guide.
Usage Metrics data is collected from your Release organization(s) and delivered to your Reporting organization, where the MetricsDataFile API is exposed. We recommend using your Business organization as your Reporting organization for flexible usage, such as linking usage data to licenses from the License Management App (LMA).
How can I get started?
Kick off the process of setting up Environment Hub and log a case in Partner Portal to enable Usage Metrics in your organizations. Once it’s enabled, there are two approaches to utilizing the feature:
- Customize and configure analytics to your specific need. We demonstrated how to parse and format the usage data into custom object records. We provided instructions in our Usage Metrics Enablement Guide.
- Install our visualization component. We created an unmanaged package that presents a set of visualization charts and graphs about your application and customer usage. More information on the visualization tool here.