GM - Interaction Logger
(gmpkg:interactionLoggerLWC)
Documentation
GM - Interaction Logger component is a utility component that tracks user interactions from a UI perspective. Enabling User Interactions is a prerequisites to use the logger.
Use case: Track the page load for a specific app or a specific audience (User, Profile). The logger can be used from the app build or from a Lightning component (Aura/LWC).
Specification
Message
String
JSON Message structure to track, ensure it includes the following elements:
eventType: Event type. should be set to 'Interaction'. Other event types will be added in the future.
interactionName: Interaction name
interactionLabel: Interaction label
componentType: Component type.
componentName: Component name.
componentLabel: Component label.
namespacePrefix: Namespace prefix.
The namespace prefix is useful to track interactions for custom/managed components and being able to filter per package.
API Reference
LWC Implementation
To leverage the interaction logger in your LWC component, the logger should be wrapped in the markup as below:
The interaction logger exposes a public api publishEvent. To publish an event, just call the api and pass the message payload as a JSON object.
Last updated