Logs an event with the Optimove SDK, where each parameter of the event is defined as a
key-value pair within the data object.
Supported value types for the data object are: string, number, and boolean.
The eventName and the keys of data are passed to the Optimove SDK verbatim. Custom events
must be declared in your Optimove tenant configuration before they are accepted, and event
reporting requires the OptiTrack feature to be enabled for the tenant.
Example:
const modules = await Eitri.modules();
const logEvent = modules?.optimove?.logEvent;
if (!logEvent) return;
await logEvent({
eventName: "product_view",
data: {
revenue: 29.99,
currency: "BRL",
productId: "sku-001"
}
})
Object describing the event.
Object describing the event's data. Values must be primitives (string, number, or boolean).
Name of the event.
Reports a screen visit to the Optimove SDK.
Optimove models screen visits as a dedicated event type rather than a custom event, so this has no equivalent in tracking.logEvent and is the only way to record one.
Example:
const modules = await Eitri.modules();
const reportScreenVisit = modules?.optimove?.reportScreenVisit;
if (!reportScreenVisit) return;
await reportScreenVisit({
screenTitle: "Account creation",
screenCategory: "Accounts"
})
Object describing the screen visit.
OptionalscreenCategory?: stringOptional category the screen belongs to. Omitted when absent or blank.
Title of the visited screen. Required; an empty value is rejected.
Collection of functions responsible for tracking user activity in an Eitri-App using the Optimove SDK (Optimove + Optimobile).
This module exposes user-activity tracking only. The wider Optimove integration also covers push notifications, but that has no dedicated bridge surface here: registration, receipt and deeplink routing are wired natively. In-app messaging is not integrated.
Requirements: This feature must be enabled in the Eitri Shopping App native configuration by providing the
optimoveconfiguration (Optimove SDK credentials and Optimove Mobile credentials) in the app configuration file.Remarks
User identity is not set here, but in session.notifyLogin and session.notifyLogout.
Optimove receives only the identity part of the login payload, because its SDK has no public API for profile attributes:
customerIdbecomes the Optimove SDK ID (user identifier).email, when present and not blank, is registered together with the SDK ID. Without it, only the SDK ID is set.phone,name,first_name,last_name,birthday,gender, address fields) and theextrasbag are not sent to Optimove. Customer profile data is expected to reach Optimove through the brand's server-side data integration, keyed by the samecustomerId.On session.notifyLogout the SDK has no way to clear the user identifier, so the install reverts to an anonymous visitor until the next login.
Events sent through tracking.logEvent already reach Optimove along with every other configured provider. Use logEvent here only when an event is meant for Optimove alone.