iOS Mobile SDK: Notify Search Event

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
    })

 

 

Congratulations!
You've reached the end of the lesson.

  

Do you still have unresolved questions?
Remember that our Connectif specialists are available to assist you. To contact them, simply open a support ticket by clicking on the blue "Help" button in your dashboard.


Keep Learning!

To fully unlock the potential of your Connectif account, we recommend continuing with the following articles:

 
Was this article helpful?
0 out of 0 found this helpful