Browse Source

feat(埋点): 添加游客页头像上传和昵称保存的点击事件埋点

refactor(埋点): 优化医生患者列表材料上传埋点逻辑
docs(埋点): 更新埋点文档中游客页和医生患者列表的事件说明
master
kola-web 12 hours ago
parent
commit
85a5aac238
  1. 10
      .trae/documents/tracking_plan.md
  2. 9
      src/doctor/pages/patientList/index.ts
  3. 2
      src/pages/tourists/index.ts

10
.trae/documents/tracking_plan.md

@ -105,9 +105,7 @@ @@ -105,9 +105,7 @@
#### 3.2.1 启动页 (pages/start/index)
| pageName 编码 | 触发元素 | 说明 |
| --------------------------- | ---- | ----------- |
| patient\_start\_scan\_click | 扫码进入 | 用户通过扫码进入小程序 |
该页面暂无点击事件埋点。
#### 3.2.2 游客页 (pages/tourists/index)
@ -259,10 +257,8 @@ @@ -259,10 +257,8 @@
| click\_doctor\_patient\_enroll\_start | 入组开始时间 | 选择入组开始时间 |
| click\_doctor\_patient\_enroll\_end | 入组结束时间 | 选择入组结束时间 |
| click\_doctor\_patient\_preview | "查看提交材料" | 预览材料图片 |
| click\_doctor\_patient\_upload\_jump | "提交"跳转材料 | 上传跳转材料 |
| click\_doctor\_patient\_upload\_enroll | "提交"入组材料 | 上传入组材料 |
| click\_doctor\_patient\_reupload\_jump | "重新提交"跳转 | 重新上传跳转材料 |
| click\_doctor\_patient\_reupload\_enroll | "重新提交"入组 | 重新上传入组材料 |
| click\_doctor\_patient\_upload\_jump | "提交"/"重新提交"跳转材料 | 上传跳转材料 |
| click\_doctor\_patient\_upload\_enroll | "提交"/"重新提交"入组材料 | 上传入组材料 |
#### 3.2.15 教育列表 (doctor/pages/articleList/index)

9
src/doctor/pages/patientList/index.ts

@ -366,11 +366,12 @@ Page({ @@ -366,11 +366,12 @@ Page({
const title = isJumpMaterial ? '上传跳转证明材料' : '上传入组证明材料'
// 根据类型和状态判断埋点事件
// auditStatus: 0-未提交(显示"提交"), 3-审核驳回(显示"重新提交")
const materialType = isJumpMaterial ? 'jump' : 'enroll'
const patientItem = patient
const isReupload = isJumpMaterial
? patientItem.jumpMaterial?.auditStatus === 2
: patientItem.enrollMaterial?.auditStatus === 2
const auditStatus = isJumpMaterial
? patient.jumpAuditStatus
: patient.enrollAuditStatus
const isReupload = auditStatus === 3
if (isReupload) {
trackClick(`click_doctor_patient_reupload_${materialType}`)
} else {

2
src/pages/tourists/index.ts

@ -27,6 +27,7 @@ Page({ @@ -27,6 +27,7 @@ Page({
},
// 选择头像
onChooseAvatar(e: WechatMiniprogram.CustomEvent) {
trackClick('click_avatar_upload')
const { avatarUrl } = e.detail
const app = getApp<IAppOption>()
// 上传头像
@ -63,6 +64,7 @@ Page({ @@ -63,6 +64,7 @@ Page({
},
// 昵称失焦时保存
onNicknameBlur(e: WechatMiniprogram.CustomEvent) {
trackClick('click_nickname_save')
const nickname = e.detail.value
this.setData({
nickname,

Loading…
Cancel
Save