interface VisitorQueryContext {
    data?: VisitorData;
    error?: Error;
    getData: ((tags?, linkedId?, options?) => Promise<null | VisitorData>);
    isLoading?: boolean;
}

Hierarchy

  • VisitorQueryResult
    • VisitorQueryContext

Properties

Visitor identification data

error?: Error

Error message in case of failed getData() call

getData: ((tags?, linkedId?, options?) => Promise<null | VisitorData>)

Retrieve visitor identification data using your public API key.

By default, errors are stored in VisitorQueryResult.error and this method returns null in case of error. Set GetDataOptions.throwOnError to true to rethrow and reject the returned promise.

Type declaration

    • (tags?, linkedId?, options?): Promise<null | VisitorData>
    • Parameters

      • Optional tags: Tags

        is a customer-provided value or an object that will be saved together with the analysis event and will be returned back to you in a webhook message or when you search for the visit in the server API. more info in the documentation page

      • Optional linkedId: string

        is a way of linking current analysis event with a custom identifier. This will allow you to filter visit information when using the Server API more info in the documentation page

      • Optional options: GetDataOptions

        configures the request and error handling.

      Returns Promise<null | VisitorData>

isLoading?: boolean

Request state after calling getData()