Merge branch 'feat/GHZSCY-6982-2' into 'dev'
feat:【光环助手】搜索业务:神策埋点相关搜索结果点击事件新增序号属性position https://jira.shanqu.cc/browse/GHZSCY-6982 See merge request halo/android/assistant-android!2111
This commit is contained in:
@ -37,9 +37,9 @@ class UserSearchListFragment : LazyListFragment<FollowersOrFansEntity, UserSearc
|
||||
SensorsBridge.trackUserSearchResultClick(
|
||||
GlobalActivityManager.getCurrentPageEntity().pageId,
|
||||
GlobalActivityManager.getCurrentPageEntity().pageName,
|
||||
mListViewModel.sourceEntrance,
|
||||
mSearchKey,
|
||||
SearchActivity.toTrackSearchType(mSearchType),
|
||||
mListViewModel.sourceEntrance,
|
||||
userId,
|
||||
position
|
||||
)
|
||||
|
||||
@ -7,6 +7,8 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.util.DirectUtils
|
||||
import com.gh.common.util.NewFlatLogUtils
|
||||
import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.SearchActivity
|
||||
import com.gh.gamecenter.common.base.GlobalActivityManager
|
||||
import com.gh.gamecenter.common.exposure.ExposureSource
|
||||
import com.gh.gamecenter.common.utils.*
|
||||
import com.gh.gamecenter.common.view.DrawableView
|
||||
@ -124,6 +126,32 @@ class SearchSubjectItemViewHolder(var binding: SearchSubjectItemBinding) : Recyc
|
||||
text = "游戏"
|
||||
)
|
||||
}
|
||||
|
||||
if (it.isMiniGame()) {
|
||||
SensorsBridge.trackMiniGameSearchResultClick(
|
||||
GlobalActivityManager.getCurrentPageEntity().pageId,
|
||||
GlobalActivityManager.getCurrentPageEntity().pageName,
|
||||
sourceEntrance,
|
||||
key,
|
||||
SearchActivity.toTrackSearchType(type),
|
||||
it.id,
|
||||
it.name ?: "",
|
||||
it.categoryChinese,
|
||||
bindingAdapterPosition
|
||||
)
|
||||
} else {
|
||||
SensorsBridge.trackGameSearchResultClick(
|
||||
GlobalActivityManager.getCurrentPageEntity().pageId,
|
||||
GlobalActivityManager.getCurrentPageEntity().pageName,
|
||||
sourceEntrance,
|
||||
key,
|
||||
SearchActivity.toTrackSearchType(type),
|
||||
it.id,
|
||||
it.name ?: "",
|
||||
it.categoryChinese,
|
||||
bindingAdapterPosition
|
||||
)
|
||||
}
|
||||
}
|
||||
headContainer.adLabelTv.goneIf(!entity.adIconActive)
|
||||
headContainer.headTitle.text = entity.name
|
||||
@ -144,6 +172,17 @@ class SearchSubjectItemViewHolder(var binding: SearchSubjectItemBinding) : Recyc
|
||||
SubjectData.SubjectType.NORMAL
|
||||
}
|
||||
)
|
||||
SensorsBridge.trackGameSearchResultClick(
|
||||
GlobalActivityManager.getCurrentPageEntity().pageId,
|
||||
GlobalActivityManager.getCurrentPageEntity().pageName,
|
||||
sourceEntrance,
|
||||
key,
|
||||
SearchActivity.toTrackSearchType(type),
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
bindingAdapterPosition
|
||||
)
|
||||
} else if (entity.adId.isNotEmpty() && entity.codeId.isNotEmpty()) {
|
||||
SubjectActivity.startAdSubjectActivity(
|
||||
context,
|
||||
|
||||
@ -260,7 +260,8 @@ class SearchGameResultAdapter(
|
||||
holder.binding.gameItemIncluded,
|
||||
item,
|
||||
mContext,
|
||||
this
|
||||
this,
|
||||
sourceEntrance
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -478,7 +479,8 @@ class SearchGameResultAdapter(
|
||||
binding.gameItemIncluded,
|
||||
item,
|
||||
mContext,
|
||||
this
|
||||
this,
|
||||
sourceEntrance
|
||||
)
|
||||
|
||||
}
|
||||
@ -899,7 +901,8 @@ class SearchGameResultAdapter(
|
||||
binding: SearchGameItemBinding,
|
||||
item: SearchItemData,
|
||||
context: Context,
|
||||
adapter: SearchGameResultAdapter
|
||||
adapter: SearchGameResultAdapter,
|
||||
sourceEntrance: String
|
||||
) {
|
||||
val gameEntity = item.game ?: return
|
||||
if (SPUtils.getBoolean(Constants.SP_TEENAGER_MODE)) {
|
||||
@ -944,7 +947,33 @@ class SearchGameResultAdapter(
|
||||
location = "小游戏搜索结果列表",
|
||||
searchContent = key,
|
||||
)
|
||||
|
||||
SensorsBridge.trackMiniGameSearchResultClick(
|
||||
GlobalActivityManager.getCurrentPageEntity().pageId,
|
||||
GlobalActivityManager.getCurrentPageEntity().pageName,
|
||||
sourceEntrance,
|
||||
key,
|
||||
SearchActivity.toTrackSearchType(type),
|
||||
gameEntity.id,
|
||||
gameEntity.name ?: "",
|
||||
gameEntity.categoryChinese,
|
||||
position
|
||||
)
|
||||
} else {
|
||||
SensorsBridge.trackGameSearchResultClick(
|
||||
GlobalActivityManager.getCurrentPageEntity().pageId,
|
||||
GlobalActivityManager.getCurrentPageEntity().pageName,
|
||||
sourceEntrance,
|
||||
key,
|
||||
SearchActivity.toTrackSearchType(type),
|
||||
gameEntity.id,
|
||||
gameEntity.name ?: "",
|
||||
gameEntity.categoryChinese,
|
||||
position
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
refreshCallback = null
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user