Create a new event to track a profile's activity.
The event to track
Subscribes the current profile to a Klaviyo list and records its consent.
Set the profile's email and/or phone number before calling this. Push subscriptions are not
created through this API — use setPushToken instead.
The subscription to create
Resolves a Klaviyo tracking link to a Universal Link URL, then handles navigation to the resolved URL. The link must be a valid Klaviyo universal tracking link:
The tracking link to be handled
Registers a provider that the native SDK invokes when it needs to acquire or refresh an authentication token (JWT) for the current end-user.
The provider is an async function returning the current end-user's JWT, by
whatever mechanism the host application uses to obtain a fresh token
(e.g. calling its auth server or exchanging an OAuth refresh token). Read the
current user fresh on each invocation rather than capturing identity at
registration. Fetch a fresh JWT each time; do not cache tokens in the
provider. The native SDK manages token caching and refresh.
Register once and keep the provider registered across profile changes.
On logout, clear the SDK profile with resetProfile(). Apply a timeout to
every network call: the SDK does not time out or abort the provider
itself. A provider that never settles blocks later token fetches until
you register, unregister, or reset the profile.
Calling this replaces any previously-registered provider. The call itself is
synchronous (fire-and-forget) and returns void, consistent with other
configuration methods such as KlaviyoProfileApi.setProfile and
KlaviyoFormsApi.registerForInAppForms.
Async function that resolves with the current end-user's JWT.
Load in-app forms data and display a form to the user if applicable based on the forms configured in your Klaviyo account. Note [Klaviyo.initialize] must be called first
Optional configuration: FormConfigurationDuration (in seconds) of the period of user inactivity after which the user's app session is terminated and the forms session is ended. Defaults to 1 Hour.
Register a handler to receive form lifecycle events.
Function to be called when form lifecycle events occur
A function to unsubscribe from lifecycle events
Enable or disable all Klaviyo SDK logging at runtime.
Logging is enabled by default. Disabling silences all log output from the native Klaviyo SDKs on both platforms; re-enabling restores the previous log verbosity.
Note: on iOS this does not affect logging from KlaviyoSwiftExtension,
which runs in a separate app extension process.
Whether SDK logging should be enabled
Create and update properties about a profile without tracking an associated event.
The profile object to set
Update a profile's properties.
The property key to set
The property value to set
Detaches a previously-registered auth token provider to turn personalization
off. This is not a logout; use resetProfile() to clear the SDK profile.
Forwards to the native SDK, which clears the provider reference and tears
down its own token state (cached token, scheduled refresh, and the native
side of any in-flight fetch). A host provider() call that is already
running is not aborted — it runs to completion and its late response is
ignored. Re-registering after unregister works normally. A form that is
already open keeps its token until it expires, whether you call
resetProfile() or unregisterAuthTokenProvider().
The Klaviyo React Native SDK Interface
This interface extends the KlaviyoEventAPI and KlaviyoProfileApi interfaces, providing a unified API for interacting with Klaviyo's event tracking and profile management features.