Tealium Prism React Native
    Preparing search index...

    Interface Trace

    Trace controls: join a trace, leave it, or force the end of the current visit. Mirrors the native Prism Trace module. Reach it with Tealium.trace.

    The Trace module runs only when your Tealium settings configure it. Without it, every method rejects.

    Every method rejects with a TealiumError if the instance is shut down or the native SDK reports a failure.

    await tealium.trace.join("12345");
    await tealium.track("trace_demo_event");
    await tealium.trace.leave();
    interface Trace {
        forceEndOfVisit(): Promise<TrackResult>;
        join(id: string): Promise<void>;
        leave(): Promise<void>;
    }
    Index
    • Forces the end of the current visit. The SDK dispatches a kill-session event. The trace stays active until you call Trace.leave.

      Returns Promise<TrackResult>

      A Promise that resolves with the TrackResult of the kill-session event. Like any track call, the SDK can accept or drop it. The Promise rejects if no trace is joined.

    • Joins a trace. The SDK adds the trace ID to every later dispatch until you call Trace.leave or the session expires.

      Parameters

      • id: string

        Trace ID to join.

      Returns Promise<void>

      A Promise that resolves after the SDK joins the trace.

    • Leaves the current trace. Does nothing if no trace is joined.

      Returns Promise<void>

      A Promise that resolves after the SDK leaves the trace.