The “Notify Page Visited Event” is used to inform that a contact has visited any page. It does this by notifying when a user visits your page through the use of the Connectif.sendPageVisit function.
How to Use
The page visited notification uses the pageName parameter, to enrich the information of the sent events, in addition to automatically sending additional information.
As a recommendation, the appropriate place should be the onAppear() lifecycle callback in the view to be tracked, which will allow us to know when a user has started using a particular view.
Notify Page Visited Event.
- Page Info:
| Attribute | Definition | Required | Limitations |
|---|---|---|---|
| pageName | The name of the page being visited |
Yes | The first 300 characters are taken, discarding the rest. |
| tags | List of tags assigned to a page | No | The first 10 tags are taken, discarding the rest. Each "tag" element can have a maximum value of 25 characters. |
| categories | List of categories assigned to a page | No | The first 10 categories are taken, discarding the rest. Each "category" element can have a maximum value of 256 characters. |
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 to have feedback on possible errors when sending events, you can add an EventCallbacks when using our method.
EventCallbacks(
onSuccess: {
//Handling in case of success
},
onError: { error in
//Handling in case of error
})
Keep learning!
To take full advantage 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.