Tealium Prism React Native
    Preparing search index...

    Interface VisitorIdManager

    Visitor ID controls, matching the one-shot methods of the native Prism VisitorIdManager (Swift/Kotlin Tealium.visitorId), backed by the Prism SDK's VisitorId module. Reach it with Tealium.visitorId.

    The bridge doesn't expose the native subscription to visitor ID changes yet. Call VisitorIdManager.current again after an identity change, for example after writing a value to the data layer under the key named by the module's visitor_identity_key setting.

    The VisitorId module is registered and enabled by default, but your Tealium settings can disable it. While disabled, every method rejects with ErrorCode.PRISM_NATIVE_ERROR — that behavior comes from the Prism SDK; the bridge only forwards the failure.

    Visitor switching is configured through the module's visitor_identity_key in your local/remote settings JSON.

    interface VisitorIdManager {
        current(): Promise<string>;
        eraseLocalHistory(): Promise<string>;
        regenerate(): Promise<string>;
    }
    Index
    • Erases every identity association stored on this device, then generates a new visitor ID and resolves with it.

      If an identity is present in the data layer, the Prism SDK immediately associates it with the new ID, so one new association may remain. Remove the identity key from the data layer first to leave none.

      This is a device-only operation: it doesn't remove the identity from the data layer or change server-side visitor profiles.

      Rejects with ErrorCode.PRISM_NATIVE_ERROR when the VisitorId module is disabled, or when the erasure can't be stored. In the storage case nothing is erased, but the Prism SDK still uses the new ID for events until the app relaunches, then restores the previous ID and every association.

      Returns Promise<string>

    • Generates a new anonymous visitor ID and resolves with it.

      Stored identity associations are left untouched. If an identity is present in the data layer, it takes ownership of the new ID. Otherwise the new ID is unowned: the next identity written to the data layer adopts it, and a returning identity restores its own previous visitor ID.

      Important: to keep events in the anonymous gap from being attributed to the previous identity, remove the identity key from the data layer before calling this method. Calling it while the identity is still present rebinds that identity to the new ID.

      Rejects with ErrorCode.PRISM_NATIVE_ERROR when the VisitorId module is disabled, or when the new ID can't be stored. In the storage case the Prism SDK still uses the new ID for events until the app relaunches, then restores the previous one.

      Returns Promise<string>