SearchEventTemplate
Search event template. Use with com.urbanairship.analytics.CustomEvent.newBuilder or com.urbanairship.analytics.customEvent to create a custom event with search template properties.
Example (Kotlin):
customEvent(
SearchEventTemplate.Type.SEARCH,
SearchEventTemplate.Properties(
category = "hotels",
query = "beach resort",
totalResults = 53
)
) {
setEventValue(1.0)
}.track()Content copied to clipboard
Example (Java):
SearchEventTemplate.Properties properties = SearchEventTemplate.Properties.newBuilder()
.setCategory("hotels")
.setQuery("beach resort")
.setTotalResults(53)
.build();
CustomEvent.newBuilder(SearchEventTemplate.Type.SEARCH, properties)
.setEventValue(1.0)
.build()
.track();Content copied to clipboard
See also
Types
Link copied to clipboard
class Properties(val id: String? = null, val query: String? = null, val totalResults: Long? = null, val category: String? = null, val type: String? = null, val isLTV: Boolean = false) : JsonSerializable
Link copied to clipboard