Track-inator 0.5 adds global filter tracking to Salesforce CRM Analytics

Lee Evans
4 min readJan 19, 2023

--

Summary

Track-inator is a sample application to demonstrated how a Lightning Web Component (LWC) can be embedded into a CRM Analytics dashboard.

When the Track-inator component is added to a CRMA dashboard, administrators now have the ability to track….

  • Dashboard page views
  • Step changes (i.e. selections)
  • Changes to sObject and Dataset filters.

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.

Track-inator 0.5 quick demo video on LinkedIn

Track-inator 0.4 demo video on LinkedIn

Version 0.5 update: Logging Changes to sObject and Dataset Filters

With the addition of a new attribute on the Track-inator component, administrators can now enable the tracking of user interactions on dashboard filters.

After adding the component to a dashboard, checking the box on filter tracking will log the filter changes for fields of sObjects and datasets.

When filter tracking is enabled, Track-inator log records will be created with an Event type of either “sObject Filter Change” or “Dataset Filter Change”. The name of the sObject.field or dataset.field that changed in the filter will be stored in the “Target” field

Version 0.4 update: 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.

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.

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.

Version 0.5 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.5.0 (January 19, 2023)

  • Added support for logging filter changes within dashboards
  • Added field for “Page Id”, renamed “Step Name” field to “Target”
  • Fixed Typos (hah!)

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

--

--