The "Notify Search Event" is used to report that a user has performed a search within the app. The notification is sent via the Mobile SDK using the Connectif.sendSearchEvent() method.
How to Use
The search event notification uses the searchQuery parameter to inform Connectif of the search performed by the user, and enriches the event with additional data automatically sent by the SDK.
As a recommendation, this event should be triggered right after the user submits a search within your app, to capture the query at the moment it is performed.
Notify Search Event
- Search Info:
Attribute | Definition | Required | Limitations |
---|---|---|---|
searchQuery | The search term or phrase the user entered | Yes | First 100 characters are kept, the rest are discarded. |
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.sendSearchEvent("smartphones")
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.