Constructors

Methods

  • Allows tracking for the specified [AirbridgeTrackingBlocklist] item. This function removes the given item from the current TrackingBlocklist applied in the airbridge.json, enabling tracking at runtime.

    Parameters

    Returns void

  • Blocks tracking for the specified [AirbridgeTrackingBlocklist] item. This function adds the given item to the current TrackingBlocklist applied in the airbridge.json, disabling tracking at runtime.

    Parameters

    Returns void

  • Clears all device aliases.

    Returns void

  • Clears all user information.

    Returns void

  • Clears all user aliases.

    Returns void

  • Clears all user attributes.

    Returns void

  • Clear the user email.

    Returns void

  • Clear the user ID.

    Returns void

  • Clear the user phone number.

    Returns void

  • Notifies that an in-app area within an app has been clicked on by the user.

    Parameters

    • trackingLink: string

      tracking link uri

    • OptionalonSuccess: (() => void)

      Callback to be invoked when tracking link is successfully handled.

        • (): void
        • Returns void

    • OptionalonFailure: ((error: Error) => void)

      Callback to be invoked when any error occurs.

        • (error): void
        • Parameters

          • error: Error

          Returns void

    Returns Promise<boolean>

    true if all of the following conditions are met below, false otherwise.

    • If the SDK is initialized and enabled.
    • If tracking link is successfully handled.
  • Creates a tracking-link using airbridge-server that move user to specific page of app and track click-event.

    Parameters

    • channel: string

      The channel of tracking-link.

    • option: Record<string, any>

      The option to create tracking-link.

    • onSuccess: ((airbridgeTrackingLink: AirbridgeTrackingLink) => void)

      Created tracking-link is delivered if succeed.

    • OptionalonFailure: ((error: Error) => void)

      Error is delivered if failed.

        • (error): void
        • Parameters

          • error: Error

          Returns void

    Returns void

  • Creates a script that initialize the web interface.

    Parameters

    • webToken: string

      The token to initialize Airbridge Web SDK.

    • postMessageScript: string

      The JavaScript code to post commands from web to app.

    Returns Promise<undefined | string>

    web interface script

  • Disables the SDK.

    Returns void

  • Enables the SDK.

    Returns void

  • Fetch airbridgeGeneratedUUID of SDK.

    Parameters

    • onSuccess: ((airbridgeGeneratedUUID: string) => void)

      Callback to be invoked when airbridgeGeneratedUUID is successfully handled.

        • (airbridgeGeneratedUUID): void
        • Parameters

          • airbridgeGeneratedUUID: string

          Returns void

    • OptionalonFailure: ((error: Error) => void)

      Callback to be invoked when any error occurs.

        • (error): void
        • Parameters

          • error: Error

          Returns void

    Returns Promise<boolean>

  • Fetch deviceUUID of SDK.

    Parameters

    • onSuccess: ((deviceUUID: string) => void)

      Callback to be invoked when deviceUUID is successfully handled.

        • (deviceUUID): void
        • Parameters

          • deviceUUID: string

          Returns void

    • OptionalonFailure: ((error: Error) => void)

      Callback to be invoked when any error occurs.

        • (error): void
        • Parameters

          • error: Error

          Returns void

    Returns Promise<boolean>

  • Handles commands from the web interface.

    Parameters

    • command: string

      The command to handle.

    Returns void

  • Notifies that the in-app area within the app has been exposed to the user.

    Parameters

    • trackingLink: string

      tracking link uri

    • OptionalonSuccess: (() => void)

      Callback to be invoked when tracking link is successfully handled.

        • (): void
        • Returns void

    • OptionalonFailure: ((error: Error) => void)

      Callback to be invoked when any error occurs.

        • (error): void
        • Parameters

          • error: Error

          Returns void

    Returns Promise<boolean>

    true if all of the following conditions are met below, false otherwise.

    • If the SDK is initialized and enabled.
    • If tracking link is successfully handled.
  • Indicates that SDK can track event automatically for each user purchases product through in-app-purchase.

    Returns Promise<boolean>

    true if the SDK is enabled for in-app-purchase tracking, false otherwise.

  • Checks whether the SDK is currently enabled.

    Returns Promise<boolean>

    true if the SDK is enabled, false otherwise.

  • Checks whether the tracking feature of SDK is currently enabled.

    Returns Promise<boolean>

    true if the tracking feature of SDK tracking is enabled,false otherwise.

  • Indicates whether notification was sent by Airbridge to track uninstall of app.

    Parameters

    • notification: Record<string, any>

      The notification to check.

    Returns boolean

  • Registers the FCM or APNS registration token to track app uninstalls.

    Parameters

    • token: string

      The FCM or APNS registration token.

    Returns void

  • Removes the device alias with the given key.

    Parameters

    • key: string

      The key that uniquely identifies the device alias.

    Returns void

  • Removes the user alias with the given key.

    Parameters

    • key: string

      The key that uniquely identifies the user alias.

    Returns void

  • Removes the user attribute with the given key.

    Parameters

    • key: string

      The key that uniquely identifies the user attribute.

    Returns void

  • Sets the key, value pair to the device alias.

    Parameters

    • key: string

      The key that uniquely identifies the device alias.

    • value: string

      The value to set for the device alias.

    Returns void

  • Sets a listener for receiving attribution of install event.

    Parameters

    • onReceived: ((attribution: Record<string, string>) => void)

      Map of attribution is delivered.

        • (attribution): void
        • Parameters

          • attribution: Record<string, string>

          Returns void

    Returns void

  • Handles deeplink and deferred-deeplink.

    Parameters

    • onReceived: ((deeplink: string) => void)

      URL of deeplink is delivered.

        • (deeplink): void
        • Parameters

          • deeplink: string

          Returns void

    Returns void

  • Sets the key, value pair to the user alias.

    Parameters

    • key: string

      The key that uniquely identifies the user alias.

    • value: string

      The value to set for the user alias.

    Returns void

  • Sets the key, value pair to the user attribute.

    Parameters

    • key: string

      The key that uniquely identifies the user attribute.

    • value: any

      The value to set for the user attribute.

    Returns void

  • Sets the user email.

    Parameters

    • email: string

      The user email.

    Returns void

  • Sets the user ID.

    Parameters

    • id: string

      The user ID.

    Returns void

  • Sets the user phone number.

    Parameters

    • phone: string

      The user phone number.

    Returns void

  • Starts tracking event automatically for each user purchases product through in-app-purchase.

    Returns void

  • Start collecting and transferring events.

    Returns void

  • Stops tracking event automatically for each user purchases product through in-app-purchase.

    Returns void

  • Stop collecting and transferring events.

    Returns void

  • Tracks user behavior through event tracking with attributes.

    Parameters

    • category: string

      Name of event.

    • OptionalsemanticAttributes: Record<string, any>

      Additional attributes of the event that defined by Airbridge.

    • OptionalcustomAttributes: Record<string, any>

      Additional attributes of the event.

    Returns void