Google标签管理器中的自定义事件触发器 [英] custom event trigger in google tag manager
问题描述
从你的问题来看,你是如何设置它的有点不清楚。它应该是这样的:
dataLayer.push({
'event':'myEvent'
})
(假定dataLayer已经初始化)。
在GTM中,您转到变量部分。在具有预定义变量的框中,点击事件前面的复选框。现在您已准备好在触发器中使用自定义事件。
转到触发器,选择新建 - >自定义事件。在事件名称框中输入myEvent(根据我的示例,用您自己的值替换)。
自定义事件仅在存在键/值在dataLayer中,键是event(这是GTM中的一个'保留字')。事件名称始终是该键的值。
Every time i create a custom trigger event it doesn't get fire. Can anybody please what may be the reason. I have created 'gacustomevent'custom triggerand have name it 'gaevent' but the event is not getting fired. Iwant to use the event in the dataLayer to capture the value. Any advice on how to get issue resolve
It's a bit unclear from your question how you set this up. It should look like this:
dataLayer.push({
'event':'myEvent'
})
(this assumes that the dataLayer is already initialized).
In GTM you go to the "variables" section. In the boxes with the predefined variables you hit the checkbox in front of "event". Now you're ready to use your custom event in a trigger.
Go to "trigger", select new -> custom event. In the event name box you enter "myEvent" (as per my example, substitute with your own value).
The custom event only works when there is a key/value pair in the dataLayer where the key is "event" (that's kind of a 'reserved word' in GTM). The event name is always the value for that key.
这篇关于Google标签管理器中的自定义事件触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!