Google Tag Manager is hiding my custom HTML tag with css

我们两清 提交于 2019-12-10 11:39:54

问题


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;"> is not part of the code I added to my tag.

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


回答1:


I fixed this by turning off the option: "Support document.write" on the Custom HTML tag configuration.



来源:https://stackoverflow.com/questions/40364341/google-tag-manager-is-hiding-my-custom-html-tag-with-css

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