RUM powered by Grail JavaScript API - 1.327.2
    Preparing search index...

    Interface UserActionTrackerExperimental

    An object to work with user actions.

    interface UserActionTracker {
        get autoClose(): boolean;
        set autoClose(stopAutomatically: boolean): void;
        get event_properties(): Record<
            `event_properties.${string}`,
            string
            | number
            | boolean,
        >;
        set event_properties(
            properties: Record<
                `event_properties.${string}`,
                string
                | number
                | boolean,
            >,
        ): void;
        get name(): string;
        set name(value: string): void;
        get startTime(): number;
        set startTime(value: number): void;
        get state(): "complete" | "active";
        finish(): void;
        subscribe(subscriber: (event: UserActionEndEvent) => void): () => void;
    }
    Index

    Accessors

    • get autoClose(): boolean
      Experimental

      Returns boolean

      True if this user action stops automatically. If false, the user action has to be stopped with a call to finish.

    • set autoClose(stopAutomatically: boolean): void
      Experimental

      Allows to configure this user action to stop automatically.

      Parameters

      • stopAutomatically: boolean

        If set to false, the user action has to be stopped with a call to finish.

      Returns void

    • get event_properties(): Record<
          `event_properties.${string}`,
          string
          | number
          | boolean,
      >
      Experimental

      Retrieves the event properties for the user action.

      Returns Record<`event_properties.${string}`, string | number | boolean>

      The event properties for the user action.

    • set event_properties(
          properties: Record<
              `event_properties.${string}`,
              string
              | number
              | boolean,
          >,
      ): void
      Experimental

      Sets the event properties for the user action.

      Parameters

      • properties: Record<`event_properties.${string}`, string | number | boolean>

        The properties to set for the event.

      Returns void

    • get name(): string
      Experimental

      Retrieves the name of the user action.

      Returns string

      The name of the user action.

    • set name(value: string): void
      Experimental

      Sets the name of the user action.

      Parameters

      • value: string

        The name to set for the user action.

      Returns void

    • get startTime(): number
      Experimental

      Retrieves the start time of the user action.

      Returns number

      The start time of the user action.

    • set startTime(value: number): void
      Experimental

      Sets the start time of the user action.

      Parameters

      • value: number

        The start time to set for the user action. Must not be in the future.

      Returns void

    • get state(): "complete" | "active"
      Experimental

      Retrieves the current state of the user action, which can be either "active" or "complete".

      Returns "complete" | "active"

      The current state of the user action.

    Methods

    • Experimental

      Completes this user action and sends a user action event for it.

      Returns void

    • Experimental

      Subscribes to this user action to be notified when it would automatically complete.

      Parameters

      Returns () => void