@@ -367,14 +367,15 @@ object ConstructorIo {
367367 * @param filterValue the value of the primary filter, i.e. "Produce"
368368 * @param resultCount the number of results for that filter name/value pair
369369 */
370- fun trackBrowseResultsLoaded (filterName : String , filterValue : String , resultCount : Int , url : String = "Not Available ") {
371- var completable = trackBrowseResultsLoadedInternal(filterName, filterValue, resultCount, url)
370+ fun trackBrowseResultsLoaded (filterName : String , filterValue : String , resultCount : Int , sectionName : String? = null, url : String = "Not Available ") {
371+ var completable = trackBrowseResultsLoadedInternal(filterName, filterValue, resultCount, sectionName, url)
372372 disposable.add(completable.subscribeOn(Schedulers .io()).subscribe({}, {
373373 t -> e(" Browse Results Loaded error: ${t.message} " )
374374 }))
375375 }
376- internal fun trackBrowseResultsLoadedInternal (filterName : String , filterValue : String , resultCount : Int , url : String = "Not Available "): Completable {
376+ internal fun trackBrowseResultsLoadedInternal (filterName : String , filterValue : String , resultCount : Int , sectionName : String? = null, url : String = "Not Available "): Completable {
377377 preferenceHelper.getSessionId(sessionIncrementHandler)
378+ val section = sectionName ? : preferenceHelper.defaultItemSection
378379 val browseResultLoadRequestBody = BrowseResultLoadRequestBody (
379380 filterName,
380381 filterValue,
@@ -387,13 +388,13 @@ object ConstructorIo {
387388 configMemoryHolder.userId,
388389 configMemoryHolder.segments,
389390 true ,
390- preferenceHelper.defaultItemSection ,
391+ section ,
391392 System .currentTimeMillis()
392393 )
393394
394395 return dataManager.trackBrowseResultsLoaded(
395396 browseResultLoadRequestBody,
396- arrayOf(Constants .QueryConstants .ACTION to Constants . QueryValues . EVENT_BROWSE_RESULTS )
397+ arrayOf(Constants .QueryConstants .SECTION to section )
397398 )
398399 }
399400
0 commit comments