Commit 58bd1689 authored by tom's avatar tom

send page number

parent dba238fd
...@@ -14,6 +14,7 @@ export default function useLogPageView(isInited: boolean) { ...@@ -14,6 +14,7 @@ export default function useLogPageView(isInited: boolean) {
const pathname = router.pathname; const pathname = router.pathname;
const tab = getQueryParamString(router.query.tab); const tab = getQueryParamString(router.query.tab);
const page = getQueryParamString(router.query.page);
React.useEffect(() => { React.useEffect(() => {
if (!appConfig.mixpanel.projectToken || !isInited) { if (!appConfig.mixpanel.projectToken || !isInited) {
...@@ -23,6 +24,7 @@ export default function useLogPageView(isInited: boolean) { ...@@ -23,6 +24,7 @@ export default function useLogPageView(isInited: boolean) {
logEvent(EventTypes.PAGE_VIEW, { logEvent(EventTypes.PAGE_VIEW, {
'Page type': getPageType(pathname), 'Page type': getPageType(pathname),
Tab: getTabName(tab), Tab: getTabName(tab),
Page: page || undefined,
}); });
}, [ isInited, pathname, tab ]); }, [ isInited, page, pathname, tab ]);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment