BatchProfile: {
    editor: (() => BatchProfileAttributeEditor);
    identify: ((identifier: string) => void);
    trackEvent: ((name: string, data?: BatchEventAttributes) => Promise<void>);
    trackLocation: ((location: Location) => void);
} = ...

Batch's user module

Type declaration

  • editor: (() => BatchProfileAttributeEditor)

    Creates a new instance of BatchProfileAttributeEditor

      • (): BatchProfileAttributeEditor
      • Returns BatchProfileAttributeEditor

        A new instance of BatchProfileAttributeEditor

  • identify: ((identifier: string) => void)

    Identifies this device with a profile using a Custom User ID.

      • (identifier): void
      • Parameters

        • identifier: string

          Custom user ID of the profile you want to identify against. If a profile already exists, this device will be attached to it. Must not be longer than 1024 characters.

        Returns void

  • trackEvent: ((name: string, data?: BatchEventAttributes) => Promise<void>)

    Track an event. Batch must be started at some point, or events won't be sent to the server.

      • (name, data?): Promise<void>
      • Parameters

        • name: string

          The event name. Must be a string.

        • Optionaldata: BatchEventAttributes

          The event attributes (optional). Must be an object.

        Returns Promise<void>

  • trackLocation: ((location: Location) => void)

    Track a geolocation update You can call this method from any thread. Batch must be started at some point, or location updates won't be sent to the server.

      • (location): void
      • Parameters

        Returns void