当变量值为空时,不要触发事件

时间:2023-02-07 19:16:20

please help.

I want to create a trigger in gtm that will not fire a tag when click url variable is empty. Is that possible? Or the other way round if it contains something

我想在gtm中创建一个触发器,当单击url变量为空时,该触发器不会触发标记。那可能吗?或者相反,如果它包含某些东西

click url, does not contain, undefined - that doesent work

点击网址,不包含,未定义 - 该工作

to be more precise, i've added a tag that tracks outbound links, but excluding my own domain isnt enough, because it also sends events when someone clicks a link that doesent contain a target url like adding a job offer to shortlist.

更准确地说,我添加了一个跟踪出站链接的标记,但排除我自己的域名是不够的,因为它还会在有人点击包含目标网址的链接时发送事件,例如将工作机会添加到候选名单中。

1 个解决方案

#1


2  

You can set up a trigger that will fire if Click Url length is more than 1 with regex /.+/ and use this trigger to fire your tracking tag

您可以使用regex /.+/设置触发器,如果​​点击网址长度超过1,则会触发该触发器并使用此触发器触发跟踪代码

#1


2  

You can set up a trigger that will fire if Click Url length is more than 1 with regex /.+/ and use this trigger to fire your tracking tag

您可以使用regex /.+/设置触发器,如果​​点击网址长度超过1,则会触发该触发器并使用此触发器触发跟踪代码