track Search Results Loaded
Content copied to clipboard
Tracks search results loaded (a.k.a. search results viewed) events.
Example:
ConstructorIo.trackSearchResultsLoaded("tooth", 789, arrayOf("1234567-AB", "1234567-AB"))Content copied to clipboard
Parameters
term
the term that results are displayed for, i.e. "Pumpkin"
result Count
the number of results for that term
customer Ids
the customerIds of shown items
analytics Tags
Additional analytics tags to pass
fun trackSearchResultsLoaded( term: String, resultCount: Int, items: Array<TrackingItem>, analyticsTags: Map<String, String>? = null)
Content copied to clipboard
Tracks search results loaded (a.k.a. search results viewed) events.
Example:
ConstructorIo.trackSearchResultsLoaded("tooth", 789, arrayOf(TrackingItem("1234", "2345", "camp1234", "owner-A"))Content copied to clipboard
Parameters
term
the term that results are displayed for, i.e. "Pumpkin"
result Count
the number of results for that term
items
the list of items shown
analytics Tags
Additional analytics tags to pass
Tracks search results loaded (a.k.a. search results viewed) events, with support for the result ID, pagination, sorting and selected filters of the search results.
Example:
val request = SearchResultsLoadedData.build("tooth", 789) {
setItems(listOf(TrackingItem("1234", "2345", "camp1234", "owner-A")))
setSectionName("Products")
setAnalyticsTags(mapOf("campaign" to "summer_sale"))
setResultId("179b8a0e-3799-4a31-be87-127b06871de2")
setResultPage(3)
setSortOrder("ascending")
setSortBy("price")
setSelectedFilters(mapOf("brand" to listOf("XYZ"), "color" to listOf("black")))
}
ConstructorIo.trackSearchResultsLoaded(request)Content copied to clipboard
Parameters
request
the search results loaded request object holding all of the tracking parameters