custom event trigger in google tag manager

谁说胖子不能爱 提交于 2019-12-04 14:54:54

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!