Home > @yext/search-ui-react > useCardAnalyticsCallback
Creates a memoized function for reporting card analytics.
Signature:
export declare function useCardAnalyticsCallback<T = DefaultRawDataType>(result: CardAnalyticsDataType<T>, analyticsType: CardAnalyticsType): () => void;
Parameter | Type | Description |
---|---|---|
result | CardAnalyticsDataType<T> | result that contains data use in the card analytics event. |
analyticsType | CardAnalyticsType | the card analytics event type to report. |
Returns:
() => void