React SDK

useTracking

useTracking provides methods for enabling tracking features.

Usage

For more in-depth on how to use it, please refer to the Tracking section.

Anatomy

useTracking returns an object containing the following properties:

NameTypeDefaultDescription
handleResultClicked(url: string) => voidThe callback to attach on result when click, can be used in conjunction with GoogleAnalytics,...
consumeInteractionToken(token: string, identifier: string, weight: number,data?: Record<string, string>) => Promise<void>Method to consume pos/neg token when using PosNegTracking.

Parameters

NameTypeDefaultDescription