Repository navigation
Usage
After the user logs in, you need to provide the user's uid to the sdk, so that the sdk can use it when sending records.
OmniSegment.login("uid")When the user logs out:
OmniSegment.logout()To ensure the OmniSegment SDK properly manages pop-up displays, it's essential to update the current page context. Each time a user navigates to a new page within your app, invoke the following method with a predefined page_key:
OmniSegment.setCurrentPage("page_key")This page_key serves as an identifier for the SDK to make decisions about displaying pop-ups. It should be defined in advance and triggered upon each page entry. The page_key is flexible and can be in either English or Chinese.
Important
The implementation of this function is crucial for the app's pop-up triggering mechanism. Ensure that setCurrentPage is called every time a user enters a new page to maintain accurate and effective pop-up management.
Note: Before using this feature, you need to integrate Firebase SDK into your project and enable Google Firebase services for your app.
You need to provide the user's Firebase Cloud Messaging Token to the sdk, so that the sdk can use it when sending records and push notifications.
OmniSegment.setFCMToken("FCM Token")After setting the FCM Token with setFCMToken, it's important to trigger an appOpen() event to send this information to the OmniSegment system. This ensures the SDK is fully configured to utilize the FCM Token for push notifications and data recording.
Important
The appOpen() event is essential for completing the setup. Make sure to call it following the FCM Token configuration to ensure the OmniSegment system receives the necessary information.