|
|
@@ -1,24 +1,36 @@
|
|
|
package com.adealink.weparty.stat
|
|
|
|
|
|
import com.adealink.frame.statistics.BaseStatEvent
|
|
|
+import com.adealink.frame.statistics.CommonEventKey
|
|
|
import com.adealink.frame.statistics.CommonEventValue
|
|
|
import com.adealink.frame.statistics.IEventValue
|
|
|
import com.adealink.frame.statistics.ReportType
|
|
|
-import com.adealink.weparty.storage.AppPref
|
|
|
import com.adealink.frame.util.ONE_DAY
|
|
|
import com.adealink.weparty.App
|
|
|
+import com.adealink.weparty.stat.constant.Page
|
|
|
import com.adealink.weparty.stat.standard.StandardStatEvent
|
|
|
-import java.util.*
|
|
|
+import com.adealink.weparty.storage.AppPref
|
|
|
+import java.util.Calendar
|
|
|
+import java.util.Date
|
|
|
|
|
|
/**
|
|
|
* 通用事件上报
|
|
|
*/
|
|
|
|
|
|
-class FirstOpenStatEvent(override val action: IEventValue = CommonEventValue.Action.EMPTY): BaseStatEvent("first_open_app")
|
|
|
-class InitProfileCompleteStatEvent(override val action: IEventValue = CommonEventValue.Action.EMPTY): BaseStatEvent("init_profile_complete")
|
|
|
-class OpenAppSecondDay(override val action: IEventValue = CommonEventValue.Action.EMPTY): BaseStatEvent("open_app_second_day")
|
|
|
-class EnterAppEvent(override val action: IEventValue = CommonEventValue.Action.EMPTY): BaseStatEvent("enter_app")
|
|
|
-class EnterHomeEvent(override val action: IEventValue = CommonEventValue.Action.EMPTY): BaseStatEvent("enter_home")
|
|
|
+class FirstOpenStatEvent(override val action: IEventValue = CommonEventValue.Action.EMPTY) :
|
|
|
+ BaseStatEvent("first_open_app")
|
|
|
+
|
|
|
+class InitProfileCompleteStatEvent(override val action: IEventValue = CommonEventValue.Action.EMPTY) :
|
|
|
+ BaseStatEvent("init_profile_complete")
|
|
|
+
|
|
|
+class OpenAppSecondDay(override val action: IEventValue = CommonEventValue.Action.EMPTY) :
|
|
|
+ BaseStatEvent("open_app_second_day")
|
|
|
+
|
|
|
+class EnterAppEvent(override val action: IEventValue = CommonEventValue.Action.EMPTY) :
|
|
|
+ BaseStatEvent("enter_app")
|
|
|
+
|
|
|
+class EnterHomeEvent(override val action: IEventValue = CommonEventValue.Action.EMPTY) :
|
|
|
+ BaseStatEvent("enter_home")
|
|
|
|
|
|
/**
|
|
|
* 注册完成
|
|
|
@@ -150,4 +162,32 @@ fun reportSecondDayOpenIfNeed(background: Boolean) {
|
|
|
OpenAppSecondDay().send()
|
|
|
StandardStatEvent.reportOpenAppSecondDay()
|
|
|
}
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+fun reportEnterPage(pageEnum: Page) {
|
|
|
+ EnterPageEvent().apply {
|
|
|
+ page to pageEnum.value
|
|
|
+ }.send()
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 进入页面
|
|
|
+ */
|
|
|
+class EnterPageEvent() : BaseStatEvent("enter_page") {
|
|
|
+
|
|
|
+ override val action: IEventValue
|
|
|
+ get() = CommonEventValue.Action.SHOW
|
|
|
+
|
|
|
+ val page = Param(CommonEventKey.PAGE)
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 首页列表,点击提交筛选用户
|
|
|
+ */
|
|
|
+class HomeListClickStatEvent() : EmptyActionStatEvent("home_list_click_filter") {
|
|
|
+ override val reportTypeList: List<ReportType>
|
|
|
+ get() = listOf(ReportType.WENEXT, ReportType.FIREBASE, ReportType.APPFLY)
|
|
|
+
|
|
|
+ val tab = Param(CommonEventKey.TAB)
|
|
|
+}
|