The “Notify Search Event” is used to indicate that a search has been performed and identifies which terms were used. It notifies via Mobile SDK when a visitor makes a search on your eCommerce using the sendSearch function.
How it works
The search event notification uses the Connectif.sendSearch(searchText: String) method to enrich the information of the sent events. We can send the searchText property with the text that the user used to perform the search.
Name | Required | Type | Multiple | Description |
---|---|---|---|---|
searchText | Yes | String | No | Text of the search performed. |
Example
The notification will look like this:
Connectif.sendSearch("something to find")
Callbacks (Opcional)
Si queremos tener feedback de posibles errores al enviar eventos, podremos añadir un EventCallbacks cuando usemos nuestro método.
EventCallbacks( onSuccess: { // Manejo en caso de éxito }, onError: { error in // Manejo en caso de 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.