The Auto-Tracking component allows users to automatically track time directly from the record view page of any Salesforce object.
The Auto-Tracking Lightning Component can be added to any standard or custom object in Salesforce. In this article, Projects is used as an example.
Add the Auto-Tracking Component to the Project Object
- Navigate to the Projects tab.
- Open any project by clicking its Project Name from the list view.
- On the Project record page, click the ⚙️ Settings (Gear) icon.
- Select Edit Page to open the Lightning App Builder.

- The Lightning App Builderpage opens for the Project record.
- In the Search Components box, search for Tabs.
- Drag and drop the Tabs component from the left-hand panel to the desired location on the right-hand side of the page (highlighted in red in the screenshot below).

- In the Tabs component, remove the Related tab by clicking the X next to it in the tab list on the right-hand side (below the Save button).
- Select the Details tab, and under Tab Label, choose Custom.
- Enter a name for the custom tab, such as Track Time on View (or any name of your choice).
- Click Done to save the changes.

- In the Search Components box on the left-hand panel, search for Auto Record.
- Drag and drop the Auto Record component into the Track Time on View tab (or the Auto Tracker section, if applicable).
- Click Save to save the page layout changes.

- Now the Auto Tracking component is added to the Project view screen
Activate the Auto-Tracking Component
After adding the Auto Record component to the page, activate it by following these steps:
- Click Activation, located next to the Save button.
- In the Activation pop-up window, select the App, Record Type, and Profile tab.
- Click Assign to Apps, Record Types, and Profiles.
- Select PK4 TimeTracker as the app, and then choose Desktop and Phone as the form factor. Click Next.
- Select the Master record type, choose the profiles that should have access to the Auto-Tracking component, and then click Next.
- Review the list of selected profiles to ensure they are correct, and then click Save.
- Click Save in the Lightning App Builder to publish the page changes.
The Auto-Tracking component is now available to users assigned to the selected profiles.
When a user opens the Project record page, time is tracked automatically while the record is being viewed. The tracked time is saved in the TT Details related list, where users can review the time recorded against the Project.
Note
- Salesforce does not support adding Lightning components to Activities and Tasks. As a result, the Auto-Tracking component cannot be added to these objects.
- Do not add the same Auto-Tracking Lightning component to both a record page tab and the Utility Bar. Adding the component in both locations can cause conflicts, resulting in incorrect or duplicate time tracking.
The Auto-Tracking component records time only for the object on whose record page it is placed, regardless of the objects configured for time tracking.
Example:
- The TimeTracker configuration is set to track time for Projects and Tasks.
- However, the Auto-Tracking component is added only to the Case record page.
- In this scenario, the component tracks time only for Cases. It does not automatically track time for Projects or Tasks, even though they are enabled in the TimeTracker configuration.
Tip
You can also enable the Start/Stop functionality for the Auto-Tracking component. This allows users to manually start and stop the timer while using the Auto-Tracking feature.
For instructions on enabling the Start/Stop functionality, click here.