chore: avoid too many event

This commit is contained in:
YunYouJun
2022-04-18 00:39:51 +08:00
parent 68388d0ad5
commit 4738d0d705
2 changed files with 6 additions and 3 deletions

View File

@@ -98,7 +98,8 @@ const toggleStuff = (item: StuffItem, category = '', e?: Event) => {
label: '食材',
})
gtm?.trackEvent({
event: `click_stuff_${item.name}`,
event: 'click_stuff',
action: item.name,
})
}
@@ -117,7 +118,8 @@ const clickTool = (item: StuffItem) => {
label: '工具',
})
gtm?.trackEvent({
event: `click_tool_${item.name}`,
event: 'click_tool',
action: item.name,
})
}

View File

@@ -16,7 +16,8 @@ const triggerGtm = (val: string) => {
label: '跳转菜谱',
})
gtm?.trackEvent({
event: `click_dish_${val}`,
event: 'click_dish',
action: val,
})
}