Google跟踪代码管理器使用CSS隐藏了我的自定义HTML代码 [英] Google Tag Manager is hiding my custom HTML tag with css
问题描述
我添加了一个自定义HTML标记,该标记由dataLayer变量触发.一切都显示在页面上,但是由于某种原因,我的整个自定义html标记代码都包裹在一个div中,该div隐藏了所有内容:
I have added a custom HTML tag which is being triggered by a dataLayer variable. Everything is showing up on the page but for some reason my entire custom html tag code is wrapped in a div that hides everything:
<div style="display: none; visibility: hidden;">
<div id="newsletter" class="animated animatedvisible rubberBand">
<h3>Dynamic Drive Newsletter</h3>
<p>Sign up for our FREE newsletter to get early access to new scripts!</p>
<form action="" method="post">
<input type="email" value="" name="EMAIL">
<input type="submit" value="Subscribe">
</form>
<span class="scrollboxclose" onclick="scrollbox1.hide()">x</span>
</div>
<div id="specialoffer" class="animated">
<b>DDWhois</b> Free Domain Whois and Research Tool. Always free, always anonymous. <button onclick="location='http://ddwhois.com'">Visit</button>
<span class="scrollboxclose" onclick="scrollbox2.hide()">x</span>
</div>
<script>var scrollbox1=new scrollBox({elementid:"newsletter",dir:"down"}),scrollbox2=new scrollBox({elementid:"specialoffer",dir:"up",fxclass:"slideInDown",pctboundary:50});</script></div>
<div style="display: none; visibility: hidden;">
不是我添加到代码中的代码的一部分.
<div style="display: none; visibility: hidden;">
is not part of the code I added to my tag.
有一个 JS脚本,它可以使自定义html代码正常工作,但我没有没有任何东西会插入额外的div
There is a JS script that makes the custom html code work but I didn't see anything in it that would insert the extra div
推荐答案
我通过关闭自定义HTML标记配置中的选项:"Support document.write"来解决了此问题.
I fixed this by turning off the option: "Support document.write" on the Custom HTML tag configuration.
这篇关于Google跟踪代码管理器使用CSS隐藏了我的自定义HTML代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!