【发布时间】:2016-11-30 21:54:16
【问题描述】:
我的一个页面上有一个按钮,我需要在 Google 标签管理器上进行跟踪。当用户单击按钮并收到消息“成功!看起来您的 DNS 配置正确!”时,我需要创建一个标签。
我不擅长编码,并且尝试了许多不同的触发器变体来实现这一点。有人可以想办法让我这样做吗? (如果你能创建一个循序渐进的过程,那就太棒了。)
同样,我只需要在他们点击并收到“成功!...”消息时进行跟踪
谢谢!
<div class="row">
<div class="col-md-8 col-md-offset-3">
<div id="dns-loading" class="alert alert-info dns-alert" role="alert">
<span class="glyphicon glyphicon-refresh"></span>
Checking your DNS configuration...
</div>
<div id="dns-good" class="alert alert-success dns-alert" role="alert">
<span class="glyphicon glyphicon-ok-sign"></span>
Success! It looks like your DNS is properly configured!
</div>
<div id="dns-bad" class="alert alert-danger dns-alert" role="alert">
<span class="glyphicon glyphicon-remove-sign"></span>
Something went wrong! It appears your DNS is misconfigured. If you
recently set your IP address range, please allow a few minutes for this
data to propagate to our DNS servers.
</div>
<center>
<div id="dns-button" class="btn btn-block btn-info">
Test DNS
</div>
<img id="dns-img" width="0" height="0"/>
</center>
<hr>
</div>
【问题讨论】:
-
只是头脑风暴,一种可能性是在页面上编写一个计时器来轮询文本,假设文本仅在特定类别(即“显示”)时出现。