📊 Lead Tracker – Salesforce LWC Component

What it does:
A Lightning Web Component that automatically tracks when users enter and exit Lead pages in Salesforce. Sits in the utility bar and monitors user behavior in real-time.

Key Features:

  • 🟢 Auto-detects when user navigates to a Lead page (00Q ID pattern)
  • 🔴 Auto-logs when user leaves the Lead page
  • ⏱️ Live timer showing time spent on current Lead
  • 🛡️ Browser alert warns before accidentally leaving an active Lead
  • 💾 Saves data to custom object for analytics

Technical Stack:

  • Lightning Web Components (JavaScript/HTML/CSS)
  • Apex controllers for data persistence
  • Custom Salesforce objects
  • Browser APIs (beforeunload, URL monitoring)

Business Value:
Provides sales managers with detailed analytics on how much time reps spend with each Lead, enabling better performance tracking and process optimization.

Installation:
Deploy to utility bar, works automatically – no user training required.