Skip to content

Commit

Permalink
feat: 添加埋点业务专区名称
Browse files Browse the repository at this point in the history
  • Loading branch information
RealOnlyone committed Jan 4, 2023
1 parent d15af00 commit b5b6baf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,15 @@ public static class EventBean {
* 页面ID
*/
private String pageId;
/**
* 业务专区名称/功能名称
*/
private String businessName;

EventBean(String eventName, String pageId) {
EventBean(String eventName, String pageId, String businessName) {
this.eventName = eventName;
this.pageId = pageId;
this.businessName = businessName;
this.time = "" + TimeUtils.getNowMills();
}

Expand All @@ -89,13 +94,13 @@ String getTime() {
return time;
}


@Override
public String toString() {
return "EventBean{" +
"eventName='" + eventName + '\'' +
", time='" + time + '\'' +
", pageId='" + pageId + '\'' +
", businessName='" + businessName + '\'' +
'}';
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,18 @@ public void addData(@NonNull String eventName) {
addData(eventName, "");
}

public void addData(@NonNull String eventName, @NonNull String pageId) {
addData(eventName, pageId,"");
}

/**
* 添加埋点数据
*
* @param eventName
*/
public void addData(@NonNull String eventName, @NonNull String pageId) {
public void addData(@NonNull String eventName, @NonNull String pageId,String businessName) {

DataPickBean.EventBean eventBean = new DataPickBean.EventBean(eventName, pageId);
DataPickBean.EventBean eventBean = new DataPickBean.EventBean(eventName, pageId,businessName);
if (events != null) {
events.add(eventBean);
//链表数据大于10s 上传数据
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ class ToolPanelDoKitView : AbsDoKitView() {

//添加埋点
if (it.isInnerKit && !TextUtils.isEmpty(it.innerKitId())) {
DataPickManager.getInstance().addData(it.innerKitId(), DataPickUtils.getDoKitHomeClickPage())
DataPickManager.getInstance().addData(it.innerKitId(), DataPickUtils.getDoKitHomeClickPage(), multiKitItem.name)
} else {
DataPickManager.getInstance().addData("dokit_sdk_business_ck",DataPickUtils.getDoKitHomeClickPage())
DataPickManager.getInstance().addData("dokit_sdk_business_ck", DataPickUtils.getDoKitHomeClickPage(), multiKitItem.name)
}

}
Expand Down

0 comments on commit b5b6baf

Please sign in to comment.