Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
xugenyuan
2024-05-23 20:49:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b82a5399c97c30f318a2be4d87f138e639d848d9
b82a5399
1 parent
c842ca33
ref |> 增加几处埋点
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
2 deletions
sight_harmony/features/wdHwAbility/oh-package.json5
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/GetuiPush.ets
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/PushContentParser.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/OneKeyLoginPage.ets
sight_harmony/products/phone/src/main/ets/pages/upgradePage/UpgradeTipDialog.ets
sight_harmony/features/wdHwAbility/oh-package.json5
View file @
b82a539
...
...
@@ -13,6 +13,7 @@
"wdKit"
:
"file:../../commons/wdKit"
,
"wdBean"
:
"file:../../features/wdBean"
,
"wdRouter"
:
"file:../../commons/wdRouter"
,
"wdTracking"
:
"file:../../features/wdTracking"
,
"wdNetwork"
:
"file:../../commons/wdNetwork"
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/GetuiPush.ets
View file @
b82a539
...
...
@@ -11,6 +11,7 @@ import { notificationManager } from '@kit.NotificationKit';
import { BusinessError } from '@kit.BasicServicesKit';
import { SpConstants } from 'wdConstant/Index';
import { PushContentBean, PushContentParser } from './PushContentParser';
import { ParamType, Tracking } from 'wdTracking/Index';
const TAG = "GetuiPush"
...
...
@@ -220,6 +221,15 @@ export class GetuiPush {
this.lastPushContent = undefined
}
private trackingClick(content: PushContentBean) {
let param: ParamType = {
"pushResourceId": "",
"pushTitle": content.notifyTitle || "",
"pushContent": content.notifyContent || "",
}
Tracking.event("push_click", param)
}
private dealWithCmdMessage(result: GTCmdMessage) {
let action: Number = result.action;
if (action === PushConst.BIND_ALIAS_RESULT) {
...
...
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/PushContentParser.ets
View file @
b82a539
...
...
@@ -9,6 +9,8 @@ export interface PushContentBean {
want?: Want // want参数 (用来在消费时,回执)
online: boolean // 解析want,是否为在线消息(在线走的是个推通道,离线走的是华为厂商通道)
pushLink?: string // 解析want,对应pushLink参数
notifyTitle?: string
notifyContent?: string
}
/*
...
...
@@ -66,7 +68,9 @@ export class PushContentParser {
if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) {
let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string
return {
isPush: true, online: true, pushLink: pushLink, want: want
isPush: true, online: true, pushLink: pushLink, want: want,
notifyTitle: gtData["title"] as string,
notifyContent: gtData["content"] as string,
}
}
}
...
...
@@ -105,7 +109,9 @@ export class PushContentParser {
if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) {
let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string
return {
isPush: true, online: false, pushLink: pushLink, want: want
isPush: true, online: false, pushLink: pushLink, want: want,
notifyTitle: want.parameters["title"] as string,
notifyContent: want.parameters["content"] as string,
}
}
}
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/OneKeyLoginPage.ets
View file @
b82a539
...
...
@@ -6,6 +6,7 @@ import { BusinessError } from '@kit.BasicServicesKit'
import { Logger, ToastUtils, CustomToast, EmitterUtils, EmitterEventId } from 'wdKit/Index'
import { LoginViewModel } from './LoginViewModel'
import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel'
import { TrackConstants, TrackingButton, TrackingPageBrowse } from 'wdTracking/Index'
const TAG = "OneKeyLoginPage"
...
...
@@ -28,10 +29,23 @@ struct OneKeyLoginPage {
maskColor:"#00000000"
})
// 埋点计算页面浏览时长
private pageStartDate: number = 0
private pageName = TrackConstants.PageName.OneClick_Login
aboutToAppear(): void {
this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||""
}
onPageShow(): void {
this.pageStartDate = Date.now()
}
onPageHide(): void {
const duration = (Date.now() - this.pageStartDate!)
TrackingPageBrowse.trackCommonPageExposureEnd(this.pageName, this.pageName, duration)
}
build() {
Column() {
this.CloseRow()
...
...
@@ -68,6 +82,8 @@ struct OneKeyLoginPage {
if (!this.agreeProtocol) {
return
}
TrackingButton.click("oneClickLoginPageLoginButton", this.pageName, this.pageName)
this.requestLogin()
})
}
...
...
sight_harmony/products/phone/src/main/ets/pages/upgradePage/UpgradeTipDialog.ets
View file @
b82a539
import { DeviceUtil, DisplayUtils, UpgradeTipContent } from 'wdKit/Index'
import { TrackConstants, TrackingButton } from 'wdTracking/Index'
@Preview
@CustomDialog
...
...
@@ -35,6 +36,8 @@ export struct UpgradeTipDialog {
.margin({top: 24})
.onClick(() => {
this.controller.close()
TrackingButton.click("notUpdatedTemporarily", TrackConstants.PageName.Update, TrackConstants.PageName.Update)
if (this.cancel) {
this.cancel()
}
...
...
@@ -88,6 +91,8 @@ export struct UpgradeTipDialog {
})
.onClick(() => {
this.controller.close()
TrackingButton.click("immediateUpdating", TrackConstants.PageName.Update, TrackConstants.PageName.Update)
if (this.confirm) {
this.confirm()
}
...
...
Please
register
or
login
to post a comment