The “Notify Page Visit Event” is used to signal that a contact has visited any page. It notifies when a user visits your page by using the Connectif.sendPageVisit function.
How to use it
The page visit notification uses the pageName parameter to enrich the information of the sent events, in addition to automatically sending extra information.
As a recommendation, the proper place to implement this should be within the onResume lifecycle callback, which allows us to know when a user has started interacting with a specific view.
Notify Page Visit Event
- Page info:
Attribute | Definition | Required | Limitations |
---|---|---|---|
pageName |
The name of the page being visited |
Yes | The first 50 characters are retrieved, discarding the rest. |
This type of event automatically collects the following information:
- Operating system: Android or iOS.
- App version.
- Operating system version.
- Connectif SDK version.
Example
The notification will look like this.
Connectif.sendPageVisit("Home")
Callbacks (Optional)
If you want feedback on potential errors when sending events, you can add an EventCallbacks when using our method.
object : EventCallbacks { override fun onSuccess() { //Handle success } override fun onError(message: String?) { //Handle error } }
Keep Learning!
To fully unlock the potential of your Connectif account, we recommend continuing with the following articles:
- Android SDK Get Started, to add Connectif Mobile SDK to your Android project.
- Firebase Cloud Messaging Setup, to enable push sending and receiving via the Android Mobile SDK.
- iOS SDK Get Started, to add Connectif Mobile SDK to your iOS project.
- Apple Push Notifications Service Setup, to enable push sending and receiving via the iOS Mobile SDK.