Showing
3 changed files
with
7 additions
and
3 deletions
| @@ -256,6 +256,7 @@ export struct TopNavigationComponentNew { | @@ -256,6 +256,7 @@ export struct TopNavigationComponentNew { | ||
| 256 | 'right': { 'anchor': '__container__', 'align': HorizontalAlign.End } | 256 | 'right': { 'anchor': '__container__', 'align': HorizontalAlign.End } |
| 257 | }) | 257 | }) |
| 258 | .onClick(() => { | 258 | .onClick(() => { |
| 259 | + Logger.info(TAG, `搜索按钮点击: 人民号`); | ||
| 259 | TrackingButton.searchClick(TrackConstants.PageName.Search, "PEOPLE") | 260 | TrackingButton.searchClick(TrackConstants.PageName.Search, "PEOPLE") |
| 260 | let params = { 'tabName': "PEOPLE" } as Record<string, string> | 261 | let params = { 'tabName': "PEOPLE" } as Record<string, string> |
| 261 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage, params) | 262 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage, params) |
| @@ -487,9 +488,10 @@ export struct TopNavigationComponentNew { | @@ -487,9 +488,10 @@ export struct TopNavigationComponentNew { | ||
| 487 | } | 488 | } |
| 488 | 489 | ||
| 489 | updateCurrentTopNavSelectedIndex() { | 490 | updateCurrentTopNavSelectedIndex() { |
| 491 | + Logger.info(TAG, `this.navItem 埋点参数topStyle: ${this.navItem.topStyle}`); | ||
| 490 | 492 | ||
| 491 | // 顶部tab埋点 | 493 | // 顶部tab埋点 |
| 492 | - if (CompUtils.isVideo(this.navItem)) { | 494 | + if (CompUtils.isNews(this.navItem)) { |
| 493 | const tab = this.myChannelList[this.currentTopNavSelectedIndex] | 495 | const tab = this.myChannelList[this.currentTopNavSelectedIndex] |
| 494 | Logger.info(TAG, `新闻tab埋点: ${JSON.stringify(tab)}`); | 496 | Logger.info(TAG, `新闻tab埋点: ${JSON.stringify(tab)}`); |
| 495 | 497 | ||
| @@ -498,7 +500,7 @@ export struct TopNavigationComponentNew { | @@ -498,7 +500,7 @@ export struct TopNavigationComponentNew { | ||
| 498 | "tabName": tab.name, | 500 | "tabName": tab.name, |
| 499 | "pageId": tab.pageId, | 501 | "pageId": tab.pageId, |
| 500 | } | 502 | } |
| 501 | - Tracking.event("home_page_tab_click ", params) | 503 | + Tracking.event("home_page_tab_click", params) |
| 502 | } else if (CompUtils.isRMH(this.navItem)) { | 504 | } else if (CompUtils.isRMH(this.navItem)) { |
| 503 | const tab = this.topNavList[this.currentTopNavSelectedIndex] | 505 | const tab = this.topNavList[this.currentTopNavSelectedIndex] |
| 504 | Logger.info(TAG, `人民号tab埋点: ${JSON.stringify(tab)}`); | 506 | Logger.info(TAG, `人民号tab埋点: ${JSON.stringify(tab)}`); |
| @@ -8,6 +8,7 @@ import { SPHelper } from 'wdKit/Index' | @@ -8,6 +8,7 @@ import { SPHelper } from 'wdKit/Index' | ||
| 8 | import { WDRouterPage, WDRouterRule } from 'wdRouter' | 8 | import { WDRouterPage, WDRouterRule } from 'wdRouter' |
| 9 | import { TrackingButton, TrackConstants } from 'wdTracking/Index' | 9 | import { TrackingButton, TrackConstants } from 'wdTracking/Index' |
| 10 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' | 10 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' |
| 11 | +import { Logger } from 'wdKit'; | ||
| 11 | 12 | ||
| 12 | const TAG = "FirstTabTopSearchComponent" | 13 | const TAG = "FirstTabTopSearchComponent" |
| 13 | 14 | ||
| @@ -73,6 +74,7 @@ export struct FirstTabTopSearchComponent { | @@ -73,6 +74,7 @@ export struct FirstTabTopSearchComponent { | ||
| 73 | .backgroundImage($r('app.media.background_search')) | 74 | .backgroundImage($r('app.media.background_search')) |
| 74 | .backgroundImageSize(ImageSize.Cover) | 75 | .backgroundImageSize(ImageSize.Cover) |
| 75 | .onClick(() => { | 76 | .onClick(() => { |
| 77 | + Logger.info(TAG, `搜索按钮点击: 新闻`); | ||
| 76 | TrackingButton.searchClick( TrackConstants.PageName.Search, "NEWS") | 78 | TrackingButton.searchClick( TrackConstants.PageName.Search, "NEWS") |
| 77 | let params = { 'tabName': "NEWS" } as Record<string, string> | 79 | let params = { 'tabName': "NEWS" } as Record<string, string> |
| 78 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage,params) | 80 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage,params) |
| @@ -22,7 +22,7 @@ export class TrackingButton { | @@ -22,7 +22,7 @@ export class TrackingButton { | ||
| 22 | params["pageId"] = pageId | 22 | params["pageId"] = pageId |
| 23 | params["pageName"] = pageName | 23 | params["pageName"] = pageName |
| 24 | 24 | ||
| 25 | - Tracking.event("search_button_click ", params) | 25 | + Tracking.event("search_button_click", params) |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | } | 28 | } |
-
Please register or login to post a comment