Expand my Community achievements bar.

SOLVED

Using DTM to select positioning of custom html code

Avatar

Level 3

I want to integrate additional html code into my website using DTM.  To set the right position of the html code in the page I am using a specific div id.

The positioning t works as planned. Problem is that if I look at the very bottom of the page you will see another container which comes from DTM as well (same rule) – Is there any possibility to prevent the second container from showing up?

I noticed that this behavior must be related to where the rule is being triggered. If I choose „trigger rule at bottom of page“ I have this second container at the bottom. If I choose „onload“ or „DOM ready“ I do not have this problem but then my html does not work correctly.

Any ideas? Thank you very much

1 Accepted Solution

Avatar

Correct answer by
Level 3

I figured it out. Problem was that I had to change the way the code was injected from sequential to non-sequential HTML. Now it works.

View solution in original post

2 Replies

Avatar

Level 3

Hi Floriane,

What do you mean when you say you see Additional container? when you write a Javascript or Html script Adobe DTM uses document.write method to inject it into the website are you referring this as additional container.

if you want details on when the script loads you can refer to this documentation: Load order for rules .

Hope this helps.

Avatar

Correct answer by
Level 3

I figured it out. Problem was that I had to change the way the code was injected from sequential to non-sequential HTML. Now it works.