Commit 6f4f25c0 by 刘鹏

feat: 首页营销埋点事件

parent a2ecac22
...@@ -40,7 +40,11 @@ class HomeBIConstants { ...@@ -40,7 +40,11 @@ class HomeBIConstants {
const val YDL_HOME_ZHUMIANMINGXIANG: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_more_click" // 首页助眠冥想 const val YDL_HOME_ZHUMIANMINGXIANG: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_more_click" // 首页助眠冥想
const val YDL_HOME_ZHUMIANICON: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_type_click" // 首页_助眠_icon const val YDL_HOME_ZHUMIANICON: String = YDL_USER_MAIN_PAGE + "ydl_user_sleep_aid_type_click" // 首页_助眠_icon
const val YDL_HOME_SEARCH_TAG: String = YDL_USER_MAIN_PAGE + "ydl_user_search_tag" // 首页_定制咨询点击tag const val YDL_HOME_SEARCH_TAG: String = YDL_USER_MAIN_PAGE + "ydl_user_search_tag" // 首页_定制咨询点击tag
const val YDL_HOME_SEARCH_TAG_CLICK: String = YDL_USER_MAIN_PAGE + "ydl_user_search_tag_click" // 首页_定制咨询点击tag
const val YDL_HOME_POPUPWINDOWS_PAGE_POPUP: String = YDL_USER_MAIN_PAGE + "popupwindows_page_popup" // 首页弹窗页面弹出事件(99元3小时弹出事件) const val YDL_HOME_POPUPWINDOWS_PAGE_POPUP: String = YDL_USER_MAIN_PAGE + "popupwindows_page_popup" // 首页弹窗页面弹出事件(99元3小时弹出事件)
const val YDL_HOME_POPUPWINDOWS_PAGE_POPUP_CLICK: String = YDL_USER_MAIN_PAGE + "popupwindows_page_popup_click" // 首页弹窗页面弹出事件(99元3小时弹出事件)
//首页_冥想(ydl_user_main_page)
const val YDL_USER_MAIN_PAGE_MUSE: String = "ydl_user_main_page"//壹点灵用户版首页 partId
} }
......
...@@ -199,6 +199,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -199,6 +199,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
if (!TextUtils.isEmpty(act.imageUrl)) { if (!TextUtils.isEmpty(act.imageUrl)) {
img_ad.visibility = View.VISIBLE img_ad.visibility = View.VISIBLE
img_ad_card.visibility = View.VISIBLE img_ad_card.visibility = View.VISIBLE
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,"1")
GlideApp.with(this).load(act.imageUrl).into(img_ad) GlideApp.with(this).load(act.imageUrl).into(img_ad)
img_ad.setOnClickListener { img_ad.setOnClickListener {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
...@@ -211,7 +212,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -211,7 +212,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
YDLRouterManager.router(act.btnLinkurl) YDLRouterManager.router(act.btnLinkurl)
} }
//定制咨询点击事件埋点 //定制咨询点击事件埋点
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,"1") ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG_CLICK,"1")
} }
} else { } else {
...@@ -233,6 +235,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -233,6 +235,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
if (!TextUtils.isEmpty(act.imageBanner)) { if (!TextUtils.isEmpty(act.imageBanner)) {
//展示弹窗 //展示弹窗
if (aa == null) { if (aa == null) {
//99元3小时弹出事件
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP,act.title)
aa = ActivityDialog(mActivity!!, act.imageBanner, act.linkUrl, act.title) aa = ActivityDialog(mActivity!!, act.imageBanner, act.linkUrl, act.title)
aa?.show() aa?.show()
aa?.setOnDismissListener { aa?.setOnDismissListener {
...@@ -248,9 +252,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>() ...@@ -248,9 +252,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
location[1] - heig, location[1] - heig,
location[0] location[0]
).show() ).show()
//99元3小时弹出事件 }
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP,"1")
}
} }
} }
} }
......
...@@ -7,7 +7,9 @@ import com.ydl.webview.H5Params ...@@ -7,7 +7,9 @@ import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.module.GlideApp import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydl_router.manager.YDLRouterManager import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.home.R import com.yidianling.home.R
import com.yidianling.home.constants.HomeBIConstants
import kotlinx.android.synthetic.ydl.home_dialog_activity.* import kotlinx.android.synthetic.ydl.home_dialog_activity.*
import java.lang.ref.WeakReference import java.lang.ref.WeakReference
...@@ -48,6 +50,9 @@ class ActivityDialog : Dialog { ...@@ -48,6 +50,9 @@ class ActivityDialog : Dialog {
} }
img_activity.setOnClickListener { img_activity.setOnClickListener {
//跳转 //跳转
//99元3小时点击事件
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP_CLICK,title?:"1")
if (this.linkUrl != null && this.linkUrl!!.startsWith("http")) { if (this.linkUrl != null && this.linkUrl!!.startsWith("http")) {
NewH5Activity.start(context, H5Params(this.linkUrl!!, null)) NewH5Activity.start(context, H5Params(this.linkUrl!!, null))
} else { } else {
......
...@@ -298,6 +298,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -298,6 +298,8 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
if (act != null) { if (act != null) {
if (!TextUtils.isEmpty(act!!.imageUrl)) { if (!TextUtils.isEmpty(act!!.imageUrl)) {
img_ad.visibility = View.VISIBLE img_ad.visibility = View.VISIBLE
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,act.title?:"1")
GlideApp.with(this).load(act!!.imageUrl).into(img_ad) GlideApp.with(this).load(act!!.imageUrl).into(img_ad)
img_ad.setOnClickListener { img_ad.setOnClickListener {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
...@@ -310,7 +312,7 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -310,7 +312,7 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
YDLRouterManager.router(act.btnLinkurl) YDLRouterManager.router(act.btnLinkurl)
} }
//定制咨询点击事件埋点 //定制咨询点击事件埋点
ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG,"1") ActionCountUtils.count(HomeBIConstants.YDL_HOME_SEARCH_TAG_CLICK,act.title?:"1")
} }
} else { } else {
img_ad.visibility = View.GONE img_ad.visibility = View.GONE
...@@ -331,14 +333,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -331,14 +333,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
if (!TextUtils.isEmpty(act.imageBanner)) { if (!TextUtils.isEmpty(act.imageBanner)) {
//展示弹窗 //展示弹窗
if (aa == null) { if (aa == null) {
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP,act?.title?:"1")
aa = ActivityDialog(mActivity, act.imageBanner, act.linkUrl, act.title) aa = ActivityDialog(mActivity, act.imageBanner, act.linkUrl, act.title)
aa?.show() aa?.show()
aa?.setOnDismissListener { aa?.setOnDismissListener {
//文案不为空才显示引导--李思开 //文案不为空才显示引导--李思开
if (!TextUtils.isEmpty(act.title)) { if (!TextUtils.isEmpty(act.title)) {
ActivityGuideDialog(mActivity, act.imageUrl, act.title).show() ActivityGuideDialog(mActivity, act.imageUrl, act.title).show()
//99元3小时弹出事件
ActionCountUtils.count(HomeBIConstants.YDL_HOME_POPUPWINDOWS_PAGE_POPUP,"1")
} }
} }
} }
......
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