To transmit custom events to Wingify via React Native, create key-value pairs using the subsequent code. The keys should correspond to the event properties of the custom event you intend to dispatch.
import { customEvent } from 'vwo-insights-react-native-sdk';
<Button
title="Event"
color="#AE7827"
click={() => {
eventName: “addToCart”,
const addToCartEventData: { [key: string]: any } = {
productName: 'VWO Insights',
productQuantity: '1',
}
customEvent(eventName, addToCartEventData)
}}
/>
This snippet dispatches a custom event named "addToCart" to Wingify using the sendCustomEvent function.
Ensure that the event name (e.g., "addToCart") and the event property names (e.g., "productQuantity") are the same as defined by you in Wingify under the Data360 module.