Track-inator 0.4 for Salesforce CRM Analytics

Lee Evans
4 min readJan 12, 2023

--

Track-inator was updated on January 19, 2023. Information on the new version can be found here

Summary

The Track-inator application demonstrates how a Lightning Web Component (LWC) can be utilized as a component within a CRM Analytics dashboard to provide tracking information.

Although Shield Event Monitoring provides good information for overall usage of CRM Analytics, customers with complex implementations want more info on how users are interacting with their dashboards.

With the 0.4 version of Track-inator, in addition to logging dashboard page views, I’ve added support for logging dashboard clicks on steps when a selection is made or unmade.

Track-inator demo video on LinkedIn

Logging Dashboard Views

The dashboard below has 2 pages. Summary and Documentation

Track-inator can be used to record which page is actually being viewed by users by placing the Track-inator LWC on the page(s) via the Component widget and check the “View Tracking” to enable the tracking.

When the dashboard is saved and viewed by users, the information collected will be captured in a platform event and then stored in the Track-inator Logs object. Data can be viewed by users with the “Track-inator Admin” Permission set.

Logging Step Changes

By checking the “Step Tracking” option in the Component attributes, each time a widget is clicked and a step has changed, the name of the step that changed will be logged.

When making a selection on the dashboard, the step name and value of the selection will be shown for debugging purposes but will not not logged.

In the Track-inator Log file, each time a selection is made on a dashboard, a record is created.

Things to Consider

Track-inator is an unsupported example that is published as an unmanaged package. All configuration and code is available within the package and can be modified to fit your specific needs.

The default org allocations for publishing platform events apply to this use case. Performance & Unlimited editions have an allocation of 250k published events per hour. The Developer edition allocation is 50k published events per hour.

Unlocked package links

Installation Instructions

  • Install package in prod/sandbox/dev org
  • In Analytics Studio, create a new dashboard and drag and drop the component onto the dashboard
  • Set the LWC attributes, and select the “Debug Mode” to view the logging information in the component.
  • When ready to log the activity, check the “View Tracking” and/or “Step Tracking” in the Track-inator component for your use case.
  • When ready to deploy, uncheck the “Debug Mode” in the component.
  • Usage is stored in the Trackinator Log object. To view all log fields, add the “Trackinator Admin” permission set to your user and then navigate to the Track-inator logs tab within the Track-inator App.

Release Notes

Version 0.4.0 (January 12, 2023)

  • Added support for logging Step changes within dashboards
  • Removed the additional browser information (sorry)
  • Only initial dashboard view (1st component render) will generate a log record.

Version 0.3.1 (June 13, 2022)

  • Added additional browser information to be included in the Platform Event. Specifically, URL Path and the Query String for the dashboard that the LWC is located on. With this information it can be determined if the dashboard was viewed within Analytics Studio OR from a lightning App page with the Analytics Dashboard embedded within it.

Version 0.2 (March 25, 2022)

  • Added classes for code coverage for Production use
  • Added attribute for toggling the display of debug information within the component
  • Added Track-inator app and home page
  • Added default list view for Track-inator Log object

Version 0.1 (March 15, 2022)

  • Beta version for sandbox/dev environments

--

--