1

We developed JavaScript for Classic UI that executes a call out to Segment as a means of establishing and tracking presence for our Users. Since this does not attempt any DOM manipulation, it works fine in a Visualforce Area component on the left nav bar in Classic, and loads for most tabs and pages (not Reports or Dashboards or Setup, but that's OK). We are able to extract and send User ID, system time and even salesforce.com URL (for record IDs, etc.) for most every page load a user performs. And it can all be done with just one script in one location, the Left column of Home Page Layouts.

Is there an equivalent to the Left Nav bar in Lightning that would allow a Visualforce Area to exist on (most) any loaded page? Or another way to similarly execute JavaScript on every page load...without editing every layout to include it?

1
  • I'm aware we could use a browser extension but for our environment and user base it is not a scalable solution. Nov 17, 2016 at 16:11

2 Answers 2

2

Generally speaking, no. Lightning doesn't have a general "global" area that you can configure, so each page would need to have a component added to it if you were interested in tracking specific pages. That said, there is a paid feature called Event Monitoring that lets you track all sorts of data, such as API usage, Salesforce1 usage, etc.

1

You may be able to do this using a utilty bar. Utility Bars, can be created for just an app or all apps depending on how it is set up. Check out component documentation.

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_utilityBarAPI.htm

Utility bars can be on all pages and can get data including record ids from the page.

I would warn though, it takes up valuable real estate and running scripts could slow things down. I do not believe the utility bar was set up for this but I do use it for something similiar.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .