简体   繁体   English

Google跟踪代码管理器,并使用触发器或代码排序

[英]Google Tag Manager and using triggers or tag sequencing

I have a custom HTML tag in my GTM, I want this to fire after another tag. 我的GTM中有一个自定义HTML标签,我希望它在另一个标签之后触发。

From my understanding, I would use the sequencing in my second tag to fire the Custom HTML tag. 据我了解,我将使用第二个标签中的排序来触发“自定义HTML”标签。 However, would I ALSO set up the same trigger for both? 但是,我还会为两者设置相同的触发器吗?

Mainly my Custom HTML tag is set to trigger on a 'ButtonA' click. 主要是将我的自定义HTML标记设置为在“ ButtonA”点击时触发。 BUT my second tag is ALSO triggered on my 'ButtonA' click. 但是我的第二个标签也是在我的“ ButtonA”点击中触发的。

If I am using sequencing. 如果我正在使用测序。 Do I need the Custom HTML tag to have the button click too if the second tag is going to use the click of 'ButtonA' as well? 如果第二个标签也要使用“ ButtonA”的点击,是否还需要Custom HTML标签也要单击按钮? Or should I keep the 'ButtonA' trigger on both of the tags. 还是应该在两个标签上都保留“ ButtonA”触发器。

You can assign separate triggers to these tags, but in your certain scenario, where the trigger is the same, but the execution order is important, you should not assign the same trigger to the second tag. 您可以为这些标签分配单独的触发器,但是在您的特定情况下,触发器是相同的,但是执行顺序很重要,因此您不应将相同的触发器分配给第二个标签。 (Although default once-per-trigger setting will prevent it to run for multiple times for the trigger and the sequencing, this way you can ensure the order of execution.) (尽管默认的“一次触发一次”设置将阻止它多次运行以进行触发和排序,但这样可以确保执行顺序。)

If you look at the second tag's settings summary, you can see, that although it will not have it's own triggers, it will follow TAG 1 immediately: 如果您查看第二个标签的设置摘要,可以看到,尽管它没有自己的触发器,但是它将立即跟随TAG 1:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM