Lightning Events
Table of contents
Lightning Events occur when a user views or interacts with a lightning component or page. The Salesforce App Analytics API (and ISVapp) distinguishes between two different types of Lightning events:
Views
This is the most commonly used event type. It is triggered every time a user views your Lightning components or pages.
Be aware that if you provide components that will be embedded multiple times on a page layout, each respective component will trigger a page view event in case the parent page is loaded. For example, embedding multiple lightning components on an Account detail page will result in multiple events if the detail page is viewed.
Please be aware that nested (also referred to as composite or embedded) Aura or LWC components are currently not being tracked. This includes Aura or Lightning Web components nested in Visualforce pages and any other composite Aura or LWC components, for example, components nested in other components.
Interactions
The Salesforce documentation is not very specific when it comes to this event type:
[...] Many interactions with your packaged Lightning component or page are available in AppExchange App Analytics, but not all. To determine which interactions we capture for your specific package, compare your packaged components to your App Analytics package usage logs.
As the above statement suggests, it is not really clearly defined, which actions result in a Lightning Interaction event and the best way to find out is to try it out.
In our experience, Lightning interactions are mostly automatically generated system events - they are not necessarily "interactions" like clicking a button. Also, we often see duplicate events being logged with identical timestamps. While you may be able to use Lightning Interactions to get accurate unique user numbers in ISVapp, be aware that the actual number of interactions (=operations in ISVapp) may be highly inflated.
Because it is not clear exactly how and when a Lightning interaction event is triggered, this event type is not enabled by default in ISVapp features. When you add a Lightning component to your ISVapp feature definition, only Lightning page views are selected by default. However, you can also select the Lightning interaction checkbox.