自定义GTM事件未显示 [英] Custom GTM event is not showing

查看:86
本文介绍了自定义GTM事件未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

单击模式时,我需要一个自定义事件("CasaCalculatorEvent"). 但是在dataLayer中,当我单击其从"CasaCalculatorEvent"到"gtm.linkClick"的更改时.

I need a custom event ("CasaCalculatorEvent") when clicking a modal. But in dataLayer, when I click its changes from "CasaCalculatorEvent" to "gtm.linkClick".

在dataLayer中这样接收:

Receive like this in dataLayer:

我的代码:

推荐答案

我建议您使用您的eventName在GTM上设置自定义事件"触发器,而不是在页面上进行硬编码.触发器可以在您的标签上触发.

Instead of hardcoding on the page, I would suggest setting up a "custom event" trigger on GTM with your eventName. The trigger can fire on your tag.

添加更多信息以澄清.我建议从您的代码中删除eventName.您的代码没有事件名称也可以.然后转到tagmanager.google.com并创建一个引用CasaCalculatorEvent的标签(匹配类别,操作和标签).然后创建一个触发器(将在其中添加事件名称),该触发器将在标记上触发.

Adding more info to clarify. I would suggest removing eventName from your code. Your code is fine without the event name. Then go on tagmanager.google.com and create a tag that references CasaCalculatorEvent (match the category, action, and label). Then create a trigger (this is where you will add the event name), that fires on the tag.

这篇关于自定义GTM事件未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆