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

Data Layer placement for DTM

zloi_dvornik
Level 3
Level 3

Hi guys

I just wanted to clarify about the best placement of the data layer for DTM.

If Ensighten should have data layer placed above the Ensighten tag, data layer for DTM should be placed in between the code snippets. I can hardly imagine any other place as fist DTM code snippet is placed in the <head> section. Am I right?

1 Accepted Solution
ParitMittal
Correct answer by
Level 10
Level 10

Hi Mike & Alla, 

@Mike Thanks for correcting .

@ Alla  If there are DTM rules firing at the top of the page , then place or move rich data objects before the DTM header embed code. Hence Ideally keeping in mind all scenarios  best placement for  the data layer  is above DTM header code

Thanks & Regards

Parit Mittal.

View solution in original post

4 Replies
ParitMittal
Level 10
Level 10

Hi Alla ,

If the all DTM rules are firing at bottom of the page, we recommend to place data layer between the DTM code snippets i.e. Header & Footer code i.e. it should be in <head>  section of the HTML document below the header code of the DTM . 

 

Thanks & Regards

Parit Mittal

mikethompson
Level 5
Level 5

If you put the data layer below the DTM header, I do not think you can trigger Top of Page rules based on the values in the data layer.

ParitMittal
Correct answer by
Level 10
Level 10

Hi Mike & Alla, 

@Mike Thanks for correcting .

@ Alla  If there are DTM rules firing at the top of the page , then place or move rich data objects before the DTM header embed code. Hence Ideally keeping in mind all scenarios  best placement for  the data layer  is above DTM header code

Thanks & Regards

Parit Mittal.

View solution in original post

zloi_dvornik
Level 3
Level 3

Thanks, guys. Sorry for no having replied earlier.