useWidgetInteractedAnalytics

The useWidgetInteractedAnalytics hook is designed to track the Widget Interacted analytics event. It provides a function, trackWidgetInteractedAction, that you can use to track interactions with a specific widget.

Example usage
const { trackWidgetInteractedAction } = useWidgetInteractedAnalytics({ widgetId: "<Widget ID>" });

Hook Argument

widgetId

TypeDefault
String (Required)No Default

Hook Return Value

trackWidgetInteractedAction

Type
Function of type: ({ interactionItem:T }) => void

interactionItem: The item representing the interaction with the widget.