The auto-tracking lighting component allows you to track time automatically from the view page of an object.


The auto-tracking lightning component can be added to any object in Salesforce. I have selected Project as an example in this article


Adding the auto-tracking component to Projects

  • Go to the Projects Tab and click on any Project (name) from the Projects list.
  • From Project view, click the Settings button and click the Edit Page,
  • The screen is redirected to the edit page of the Project. Search for Tab in the search box
  • Drag and drop the "Tab" sidebar towards the right-hand side (the place marked in Red in the screenshot) 
  • Remove the Related tab on the screen that is on the right-hand side below the Save button on the Tabs list
  • Click on the Details tab and select Custom in the list and name it as Track Time on view or any name you wish
  • Click the Done button
  • Scroll to the bottom of the screen or search for "Auto Record" from the list on the left-hand side
  • Drag and drop it into the Auto Tracker column
  • Save the changes by clicking the Save button
  • Now the Auto Tracking component is added to the Project view screen


To activate the Auto Tracking component,

  • Click the Activation button that is before the Save button,
  • Click the "App Record type and Profile" tab in the pop-up, and then click the "Assign to Apps, Record types, and Profiles",
  • Select PK4 TimeTracker, then select Desktop and Phone, in the next screen
  • Select Master and select the profiles from the list to give access to the auto-tracking component to the users and click the next button,
  • You see the list of profiles that you have selected, cross-check the profiles list, and click the Save button,
  • Now the Auto Tracking component is added to the selected profiles,
  • The time is tracked automatically when you are on the view page of a Project. And the hours worked are saved in the TT Details tab.


Note:

  • Salesforce does not allow you to track time for Activities and Tasks. So you cannot add the Lighting component to Salesforce Activities and Tasks.
  • Also, please do not add the same lighting component on the Tab and in the Utility bar. If the same lighting component is added in both places there will be conflicts. And the time will not be tracked correctly.
  • No matter what objects are set for tracking time in the configurations. The auto timer tracks time only to the object to which it is set.
    • e.g: The configuration is set to track time to Projects and Tasks,
    • The auto timer is set in the Cases tab, the auto timer tracks time only to cases and not to Projects and Tasks.