Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Using DTM to select positioning of custom html code

floriane3493069
Level 3
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
floriane3493069
Correct answer by
Level 3
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
Vijaya_Vignesh1
Level 2
Level 2

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.

floriane3493069
Correct answer by
Level 3
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