chore: update gtm track

This commit is contained in:
YunYouJun
2022-04-18 00:33:53 +08:00
parent e256e2e789
commit 68388d0ad5
2 changed files with 9 additions and 0 deletions

View File

@@ -97,6 +97,9 @@ const toggleStuff = (item: StuffItem, category = '', e?: Event) => {
action: 'click_stuff',
label: '食材',
})
gtm?.trackEvent({
event: `click_stuff_${item.name}`,
})
}
/**
@@ -113,6 +116,9 @@ const clickTool = (item: StuffItem) => {
action: 'click_tool',
label: '工具',
})
gtm?.trackEvent({
event: `click_tool_${item.name}`,
})
}
const recipePanel = ref()

View File

@@ -15,6 +15,9 @@ const triggerGtm = (val: string) => {
action: 'click_recipe',
label: '跳转菜谱',
})
gtm?.trackEvent({
event: `click_dish_${val}`,
})
}
</script>