After the SDK setup is complete, add the codes to your application as below.
appAlias
value should be sent differently for iOS and Android apps (excluding Expo apps)
Example;
const appAlias = Platform.OS === "ios" ? "RelatedStoreIOS" : "RelatedStoreAndroid";
Don't forget to ask the RMC team for your alias, SID, OID and datasource values.
import { addEventListener, VisilabsApi, EuroMessageApi, } from 'react-native-related-digital' const appAlias = 'alias' const siteId = "SID" const organizationId = "OID" const dataSource = "datasource" const visilabsApi = new VisilabsApi(appAlias, siteId, organizationId, dataSource) const euroMessageApi = new EuroMessageApi(appAlias)
Event Submission
A sample category page display event. All Visilabs events are sent with a function named customEvent
. The parameters that this function takes are performed event name and data.
Event Name : They are event names defined by Visilabs. Here you can find information about which name will come in which event. In this example the event name is Category View.
Data : It is the information sent next to the relevant event. Values are sent to certain parameter names according to the operation performed. The parameters are OM. gets the prefix.
var data = { "OM.clist": 123 }; visilabsApi.customEvent("Category View", data);
Next Step