diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt index f8401988ca..d5c267116e 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt @@ -63,7 +63,10 @@ import com.gh.gamecenter.databinding.* import com.gh.gamecenter.entity.GameUpdateEntity import com.gh.gamecenter.entity.RecommendPopupEntity import com.gh.gamecenter.eventbus.* -import com.gh.gamecenter.feature.entity.* +import com.gh.gamecenter.feature.entity.GameEntity +import com.gh.gamecenter.feature.entity.PluginLocation +import com.gh.gamecenter.feature.entity.SimpleGame +import com.gh.gamecenter.feature.entity.TagStyleEntity import com.gh.gamecenter.feature.eventbus.EBConcernChanged import com.gh.gamecenter.feature.exposure.ExposureEvent import com.gh.gamecenter.feature.utils.ApkActiveUtils @@ -71,11 +74,7 @@ import com.gh.gamecenter.feature.utils.SentryHelper import com.gh.gamecenter.forum.detail.ForumDetailActivity import com.gh.gamecenter.gamedetail.cloudarchive.CloudArchiveFragment import com.gh.gamecenter.gamedetail.desc.DescFragment -import com.gh.gamecenter.gamedetail.dialog.GameBigEventDialog -import com.gh.gamecenter.gamedetail.dialog.GameDetailMoreDialog -import com.gh.gamecenter.gamedetail.dialog.GameTagsDialog -import com.gh.gamecenter.gamedetail.dialog.SpecialDownloadDialogFragment -import com.gh.gamecenter.gamedetail.dialog.SpecialDownloadVisibilityViewModel +import com.gh.gamecenter.gamedetail.dialog.* import com.gh.gamecenter.gamedetail.entity.ContentCardEntity import com.gh.gamecenter.gamedetail.entity.NewGameDetailEntity import com.gh.gamecenter.gamedetail.entity.Video @@ -1180,6 +1179,11 @@ class GameDetailFragment : BaseLazyFragment(), IScrollable { } private fun doShowAlertDialog(dialog: GameEntity.Dialog) { + SensorsBridge.trackEvent("GameDetailDialogShow", + "game_id", mGameEntity?.id ?: "", + "game_name", mGameEntity?.name ?: "", + "game_type", mGameEntity?.categoryChinese ?: "" + ) DialogHelper.showDialogWithHtmlContent( requireContext(), dialog.title, @@ -1187,8 +1191,33 @@ class GameDetailFragment : BaseLazyFragment(), IScrollable { dialog.confirmButton.text.toString(), dialog.closeButtonText, { + SensorsBridge.trackEvent("GameDetailDialogClick", + "game_id", mGameEntity?.id ?: "", + "game_name", mGameEntity?.name ?: "", + "game_type", mGameEntity?.categoryChinese ?: "", + "link_type", dialog.confirmButton.type ?: "", + "link_id", dialog.confirmButton.link ?: "", + "link_text", dialog.confirmButton.linkText ?: "", + "button_name", dialog.confirmButton.text.toString() + ) dialog.confirmButton.text = dialog.confirmButton.linkText DirectUtils.directToLinkPage(requireContext(), dialog.confirmButton, mEntrance, "") + }, + { + SensorsBridge.trackEvent("GameDetailDialogClick", + "game_id", mGameEntity?.id ?: "", + "game_name", mGameEntity?.name ?: "", + "game_type", mGameEntity?.categoryChinese ?: "", + "button_name", dialog.closeButtonText + ) + }, + { + SensorsBridge.trackEvent("GameDetailDialogClick", + "game_id", mGameEntity?.id ?: "", + "game_name", mGameEntity?.name ?: "", + "game_type", mGameEntity?.categoryChinese ?: "", + "button_name", "关闭弹窗" + ) } ) }