fix: pass string target instead of value
This commit is contained in:
@@ -34,10 +34,9 @@ const gtm = useGtm()
|
|||||||
const toggleStuff = (item: StuffItem, category = '') => {
|
const toggleStuff = (item: StuffItem, category = '') => {
|
||||||
gtm?.trackEvent({
|
gtm?.trackEvent({
|
||||||
event: 'stuff',
|
event: 'stuff',
|
||||||
category,
|
category: `${category}_${item.name}`,
|
||||||
action: 'click',
|
action: 'click',
|
||||||
label: '食材',
|
label: '食材',
|
||||||
value: item.name,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
rStore.toggleStuff(item.name)
|
rStore.toggleStuff(item.name)
|
||||||
@@ -55,10 +54,9 @@ const clickTool = (item: StuffItem) => {
|
|||||||
|
|
||||||
gtm?.trackEvent({
|
gtm?.trackEvent({
|
||||||
event: 'stuff',
|
event: 'stuff',
|
||||||
category: 'tool',
|
category: `tool_${item.name}`,
|
||||||
action: 'click',
|
action: 'click',
|
||||||
label: '工具',
|
label: '工具',
|
||||||
value: item.name,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user