From 4b837f5959c7fa9a00c7227c1e155ed627c6d583 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 29 Jul 2021 08:29:01 +0800 Subject: [PATCH] chore: fix ga event label --- site/theme/template/Content/ComponentOverview.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/theme/template/Content/ComponentOverview.jsx b/site/theme/template/Content/ComponentOverview.jsx index 841fa0745b..eb9d2baf9c 100644 --- a/site/theme/template/Content/ComponentOverview.jsx +++ b/site/theme/template/Content/ComponentOverview.jsx @@ -9,11 +9,11 @@ import { getChildren } from 'jsonml.js/lib/utils'; import { getMetaDescription, getLocalizedPathname, getThemeConfig, getMenuItems } from '../utils'; import './ComponentOverview.less'; -const onClickCard = href => { +const onClickCard = pathname => { if (window.gtag) { window.gtag('event', '点击', { event_category: '组件总览卡片', - event_label: href, + event_label: pathname, }); } }; @@ -107,7 +107,7 @@ const ComponentOverview = ({ const href = getLocalizedPathname(url, locale === 'zh-CN', location.query); return ( - onClickCard(href)}> + onClickCard(href.onClickCard)}>