Commit 5a098f99 by 严久程

测评页面埋点事件

parent 0993f164
...@@ -39,6 +39,7 @@ class TestPlugin : MethodChannel.MethodCallHandler { ...@@ -39,6 +39,7 @@ class TestPlugin : MethodChannel.MethodCallHandler {
const val TEST_LIST_ITEM_CLICK = "testListItemClick" // 测评列表点击 const val TEST_LIST_ITEM_CLICK = "testListItemClick" // 测评列表点击
const val LOOK_ALL_TEST = "lookAllTest" // 查看全部测评 const val LOOK_ALL_TEST = "lookAllTest" // 查看全部测评
const val IS_HIDE_LEFT_BACK = "hideLeftBackLL" // 是否隐藏标题左侧布局 const val IS_HIDE_LEFT_BACK = "hideLeftBackLL" // 是否隐藏标题左侧布局
var isHideLeftBack = false // 是否隐藏标题左侧布局 var isHideLeftBack = false // 是否隐藏标题左侧布局
...@@ -56,17 +57,17 @@ class TestPlugin : MethodChannel.MethodCallHandler { ...@@ -56,17 +57,17 @@ class TestPlugin : MethodChannel.MethodCallHandler {
override fun onMethodCall(methodCall: MethodCall, result: MethodChannel.Result) { override fun onMethodCall(methodCall: MethodCall, result: MethodChannel.Result) {
when (methodCall.method) { when (methodCall.method) {
GO_BACK -> { GO_BACK -> {
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_RETURN_CLICK) // ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_RETURN_CLICK)
mActivity?.finish() mActivity?.finish()
} }
GO_SEARCH -> { GO_SEARCH -> {
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_SEARCH_CLICK) // ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_SEARCH_CLICK)
mActivity?.let { mActivity?.let {
TestSearchActivity.start(mActivity!!) TestSearchActivity.start(mActivity!!)
} }
} }
GO_MY_TESTS -> { GO_MY_TESTS -> {
ActionCountUtils.count(TestBIConstants.YDL_TEST__MAIN_MY_TEST_CLICK) // ActionCountUtils.count(TestBIConstants.YDL_TEST__MAIN_MY_TEST_CLICK)
if (!TestsIn.isLogin()) { if (!TestsIn.isLogin()) {
//如果未登录 走登录逻辑 //如果未登录 走登录逻辑
mActivity?.startActivity(TestsIn.loginWayIntent(mActivity!!)) mActivity?.startActivity(TestsIn.loginWayIntent(mActivity!!))
...@@ -83,7 +84,7 @@ class TestPlugin : MethodChannel.MethodCallHandler { ...@@ -83,7 +84,7 @@ class TestPlugin : MethodChannel.MethodCallHandler {
linkUrl?.let { linkUrl?.let {
link(linkUrl) link(linkUrl)
} }
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_BANNER_CLICK,linkUrl?:"") // ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_BANNER_CLICK,linkUrl?:"")
} }
CATEGORY_CLICK -> { CATEGORY_CLICK -> {
...@@ -91,12 +92,12 @@ class TestPlugin : MethodChannel.MethodCallHandler { ...@@ -91,12 +92,12 @@ class TestPlugin : MethodChannel.MethodCallHandler {
var tabName: String = methodCall.argument<String>("tabName")?:"" var tabName: String = methodCall.argument<String>("tabName")?:""
TestCategoryListActivity.start(mActivity!!, tabName) TestCategoryListActivity.start(mActivity!!, tabName)
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_ICON_CLICK,tabName) // ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_ICON_CLICK,tabName)
} }
} }
ADVERT_CLICK -> { ADVERT_CLICK -> {
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_SCROLL_BAR_CLICK) // ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_SCROLL_BAR_CLICK)
var linkUrl: String? = methodCall.argument<String>("linkUrl") var linkUrl: String? = methodCall.argument<String>("linkUrl")
linkUrl?.let { linkUrl?.let {
...@@ -105,14 +106,14 @@ class TestPlugin : MethodChannel.MethodCallHandler { ...@@ -105,14 +106,14 @@ class TestPlugin : MethodChannel.MethodCallHandler {
} }
TEST_LIST_ITEM_CLICK -> { TEST_LIST_ITEM_CLICK -> {
var linkUrl: String? = methodCall.arguments.toString() var linkUrl: String? = methodCall.arguments.toString()
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_ALL_TEST_LIST_CLICK,linkUrl?:"") // ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_ALL_TEST_LIST_CLICK,linkUrl?:"")
linkUrl?.let { linkUrl?.let {
link(linkUrl) link(linkUrl)
} }
} }
LOOK_ALL_TEST -> { LOOK_ALL_TEST -> {
ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_VIEW_ALL_CLICK) // ActionCountUtils.count(TestBIConstants.YDL_TEST_MAIN_VIEW_ALL_CLICK)
mActivity?.let { mActivity?.let {
TestCategoryListActivity.start(mActivity!!) TestCategoryListActivity.start(mActivity!!)
......
...@@ -16,6 +16,7 @@ import com.ydl.ydlcommon.utils.LogUtil ...@@ -16,6 +16,7 @@ import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.SharedPreferencesEditor import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.YdlBuryPointUtil import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import de.greenrobot.event.EventBus import de.greenrobot.event.EventBus
import io.flutter.app.FlutterActivity import io.flutter.app.FlutterActivity
...@@ -53,6 +54,7 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler { ...@@ -53,6 +54,7 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
const val ACTION_GET_SUB_CHANNEL_THEME: String = "action_page_layout_params"//获取子频道主页样式 const val ACTION_GET_SUB_CHANNEL_THEME: String = "action_page_layout_params"//获取子频道主页样式
const val REQUESTMAINSCROLLFOCUS: String = "requestMainScrollFocus" const val REQUESTMAINSCROLLFOCUS: String = "requestMainScrollFocus"
const val RELEASEMAINSCROLLFOCUS: String = "releaseMainScrollFocus" const val RELEASEMAINSCROLLFOCUS: String = "releaseMainScrollFocus"
const val ACTION_HTTP_BURIED_POINT: String = "action_http_buried_point"
//activity注册 //activity注册
fun activityRegister(activity: FlutterActivity) { fun activityRegister(activity: FlutterActivity) {
...@@ -182,6 +184,15 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler { ...@@ -182,6 +184,15 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
val ffrom = PlatformDataManager.getRam().getChannelName() val ffrom = PlatformDataManager.getRam().getChannelName()
result.success("$packageName,$ffrom") result.success("$packageName,$ffrom")
} }
ACTION_HTTP_BURIED_POINT ->{
val map = methodCall.arguments as HashMap<*, *>
val position = map["position"] as String
val partId = map["partId"] as String
val sign = map["sign"] as String
ActionCountUtils.count("$partId|$position",sign)
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment