Insert custom HTML in page DOM with Google Tag Manager
<p>I've implemented GTM on my website. I'm wondering if is possible to add custom HTML/JS in a specific position of the DOM.</p>

<p>This is what I've inserted in my page:</p>

<pre class="lang-html prettyprint-override"><code>&lt;div class="myClass"&gt;
    &lt;p&gt;foo&lt;/p&gt;
    &lt;script&gt;
        dataLayer.push({'event':'myEvent'})
    &lt;/script&gt;   
&lt;/div&gt;
</code></pre>

<p>and on GTM I've set up a tag with this html:</p>

<pre class="lang-html prettyprint-override"><code>&lt;div class="test"&gt;this is a test&lt;/div&gt;
&lt;iframe src="www.foo.com" /&gt;
</code></pre>

<p>which is triggered on <code>myEvent</code>.</p>

<p>Unfortunatly this is not working correctly, my tag is inserted at the bottom of my web page and not inside the <code>myClass</code> div.</p>

<p>Am I doing something wrong or this is just not allowed by GTM?</p>

<p>Thanks.</p>