Known Gotchas
For developers
This page collects the mismatches and surprising behaviors documented across the reference pages into one checklist. When type definitions (src/types.ts) and runtime behavior (src/classes/events.ts) disagree, runtime behavior is what actually ships on the wire.
Field naming mismatches
Product title is title, not productName
ProductView expects the product name under title. Sending productName will not populate the field the SDK and reporting expect. See Page and Product Events.
Order identifier is orderNo, not orderId
Purchase (and PaymentInformation) require orderNo. The example app maps the navigation param orderId into the payload field orderNo in CheckoutSuccessScreen.tsx. Sending orderId instead will fail the type contract and drop the value. See Checkout and Basket Events.
Runtime overrides input
Interaction overwrites interactionId with instanceId
In Interaction(), if instanceId is provided, the SDK sets interactionId to the same string, overwriting any distinct interactionId you passed in the same object. Playground rows that show different values illustrate intent only; on the wire they match whenever instanceId is present. For custom interaction semantics (such as search click events), use the direct sendEvent({ name: 'INTERACTION', ... }) path shown in src/hooks/useSearch.tsx. See Search, Interaction, Form and Custom.
Identify side effects driven by source and endpoint
source: 'email-collection'forcesemailNtf = true.source: 'whatsapp-collection'forceswhatsappNtf = true.isLogin === trueforcesisRegistered = true.- On the
https://per2.segmentify.comendpoint,IdentifyandRegistercan also trigger anIysPermissionevent. Identifysends withasync: false.
Type contract vs playground reality
BasketView cartUrl is type-required but omitted in the playground
The BasketViewPayload type lists cartUrl, but the Event Playground Basket View demo omits it to keep the snippet short. In production, send a stable cartUrl (for example shopapp://basket) so deep-link and basket reporting work. See Checkout and Basket Events.
type: 'sms' is outside the published interaction union
The Event Playground SMS Interaction Click sends type: 'sms', which is not in the published InteractionPayload.type union. If you use it under strict TypeScript, widen the union or align with your backend contract. See Search, Interaction, Form and Custom.
GamificationWof and GamificationScratch send the same payload
Both methods currently send name: 'GAMIFICATION' with type: 'win'. The method name (not the payload shape) is what differentiates wheel-of-fortune from scratch at the call site. See Search, Interaction, Form and Custom.
Form nests instanceId into params
Form({ formName, fields, instanceId }) sends instanceId inside params.instanceId in the outgoing payload, not as a top-level field. See Event Parameters and Types.
Configuration and identity pitfalls
Unmapped routes become Unknown Page
If a route name is missing from pageTypeMapping, PAGE_VIEW still sends but with category: 'Unknown Page', which degrades reporting and campaign targeting. Keep the mapping synchronized with real route names and aligned with your web page types. See the Page Mapping Guide.
Customer Data Platform specifics
UserTraits (and CDP lifecycle events) no-op on an empty payload
UserTraits, IdentifyUser, RegisterUser, LoginUser, and LogoutUser return immediately and never hit the network when called with an empty object ({}). You get no analytics signal, not an error.
CDP events do not persist to user storage
Unlike Register / Login / Identify, the CDP methods (UserTraits, RegisterUser, LoginUser, LogoutUser) do not write to SEGMENTIFY_USER storage and do not run IYS logic.
The CDP profile snapshot is not encrypted at rest
IdentifyUser keeps a last-identified-profile snapshot in AsyncStorage under SEGMENTIFY_USER_PROFILE to deduplicate resends. React Native has no Web Crypto / IndexedDB, so (unlike the web SDK) this snapshot is not encrypted at rest — AsyncStorage is sandboxed per app. Comparison is order-independent (keys are sorted before stringify).
Omitted CDP consent fields are not sent
CDP lifecycle methods do not default omitted callConsent, emailConsent, whatsappConsent, or smsConsent to NOT_SET. Include a consent field only when you mean to report or change it; partial updates should omit consent keys so prior SUBSCRIBED / UNSUBSCRIBED values are not overwritten on the wire.
IdentifyUser snapshot is saved only after a successful send
The dedup snapshot under SEGMENTIFY_USER_PROFILE is persisted inside sendEvent after the server accepts USER_IDENTIFY, including events replayed from the offline queue via onlineEventLogic — not only on the direct IdentifyUser call path. If delivery fails (HTTP error, network exception, or sendEvent catch), the snapshot is not updated and the same profile is eligible to send again.
Clear identify snapshot on logout
Logout and LogoutUser clear SEGMENTIFY_USER_PROFILE so a new account’s IdentifyUser is not skipped when its payload matches the previous user’s stored snapshot.
See Customer Data Platform Events.
QA checklist
- Validate lifecycle-critical events (
Purchase,Register,Login,Logout) for duplicates, especially when fired fromuseEffect. - Confirm
userId/sessionIdcontinuity across a session. - Inspect the final payload in debug mode (the
[Final Payload]log fromsendEvent()). - Fire events from deterministic business actions, not from uncontrolled component renders.