Skip to content

Commit 6d8162e

Browse files
authored
add result id to readme docs and fix resultPositionOnPage param in signature (#60)
1 parent 1a10ce3 commit 6d8162e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ ConstructorIo.trackSearchSubmit("toothpicks", "tooth")
112112
// Track when search results are loaded into view (searchTerm, resultCount)
113113
ConstructorIo.trackSearchResultsLoaded("tooth", 789)
114114

115-
// Track when a search result is clicked (itemName, customerId, searchTerm)
116-
ConstructorIo.trackSearchResultClick("Fashionable Toothpicks", "1234567-AB", "tooth")
115+
// Track when a search result is clicked (itemName, customerId, searchTerm, sectionName, resultId)
116+
ConstructorIo.trackSearchResultClick("Fashionable Toothpicks", "1234567-AB", "tooth", "Products", "179b8a0e-3799-4a31-be87-127b06871de2")
117117

118118
// Track when a search result converts (itemName, customerId, revenue, searchTerm)
119119
ConstructorIo.trackConversion("Fashionable Toothpicks", "1234567-AB", 12.99, "tooth")
@@ -128,6 +128,6 @@ ConstructorIo.trackPurchase(arrayOf("1234567-AB", "1234567-AB"), 25.98, "ORD-131
128128
// Track when browse results are loaded into view (filterName, filterValue, resultCount)
129129
ConstructorIo.trackBrowseResultsLoaded("Category", "Snacks", 674)
130130

131-
// Track when a browse result is clicked (filterName, filterValue, customerId, resultPositionOnPage)
132-
ConstructorIo.trackBrowseResultClick("Category", "Snacks", "7654321-BA", "4")
131+
// Track when a browse result is clicked (filterName, filterValue, customerId, resultPositionOnPage, sectionName, resultId)
132+
ConstructorIo.trackBrowseResultClick("Category", "Snacks", "7654321-BA", "4", "Products", "179b8a0e-3799-4a31-be87-127b06871de2")
133133
```

library/src/main/java/io/constructor/core/ConstructorIo.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ object ConstructorIo {
401401
* @param filterName the name of the primary filter, i.e. "Aisle"
402402
* @param filterValue the value of the primary filter, i.e. "Produce"
403403
* @param customerId the item identifier of the clicked item i.e "PUMP-KAB-0002"
404+
* @param resultPositionOnPage the position of the clicked item on the page i.e. 4
404405
* @param sectionName the section that the results came from, i.e. "Products"
405406
* @param resultID the result ID of the browse response that the selection came from
406407
*/

0 commit comments

Comments
 (0)