trackBrowseResultsLoaded

fun trackBrowseResultsLoaded(    filterName: String,     filterValue: String,     itemIds: Array<String>,     resultCount: Int,     sectionName: String? = null,     url: String = "Not Available",     analyticsTags: Map<String, String>? = null)

Tracks browse result loaded (a.k.a. browse results viewed) events.

Example:

ConstructorIo.trackBrowseResultsLoaded("Category", "Snacks", arrayOf("123", "234"), 674)

Parameters

filterName

the name of the primary filter, i.e. "Aisle"

filterValue

the value of the primary filter, i.e. "Produce"

itemIds

the item ids of the displayed items

resultCount

the number of results for that filter name/value pair

analyticsTags

Additional analytics tags to pass


fun trackBrowseResultsLoaded(    filterName: String,     filterValue: String,     items: Array<TrackingItem>,     resultCount: Int,     sectionName: String? = null,     url: String = "Not Available",     analyticsTags: Map<String, String>? = null)

Tracks browse result loaded (a.k.a. browse results viewed) events.

Example:

ConstructorIo.trackBrowseResultsLoaded("Category", "Snacks", arrayOf(TrackingItem("1234", "2345", "camp1234", "owner-A")), 674)

Parameters

filterName

the name of the primary filter, i.e. "Aisle"

filterValue

the value of the primary filter, i.e. "Produce"

items

the list of the displayed items

resultCount

the number of results for that filter name/value pair

analyticsTags

Additional analytics tags to pass


fun trackBrowseResultsLoaded(    filterName: String,     filterValue: String,     resultCount: Int,     sectionName: String? = null,     url: String = "Not Available",     analyticsTags: Map<String, String>? = null)

Tracks browse result loaded (a.k.a. browse results viewed) events.

Example:

ConstructorIo.trackBrowseResultsLoaded("Category", "Snacks", 674)

Parameters

filterName

the name of the primary filter, i.e. "Aisle"

filterValue

the value of the primary filter, i.e. "Produce"

resultCount

the number of results for that filter name/value pair

analyticsTags

Additional analytics tags to pass


fun trackBrowseResultsLoaded(request: BrowseResultsLoadedData)

Tracks browse result loaded (a.k.a. browse results viewed) events, with support for the result ID, pagination, sorting and selected filters of the browse results.

Example:

val request = BrowseResultsLoadedData.build("group_id", "Snacks", 674) {
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.trackBrowseResultsLoaded(request)

Parameters

request

the browse results loaded request object holding all of the tracking parameters