Setting up a DTM code in an iframe

Avatar

Avatar
Validate 1
Level 1
sharpseas
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
sharpseas
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
sharpseas
Level 1

14-06-2017

I am trying to setup a DTM within a website that is built with the body in an <iframe>. What is the best way to get this setup so that it fires properly? Any help with this is much appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

15-06-2017

Hi ,

To  Successfully track the iframe page You just need to add the same DTM Header & Footer code (that you have on parent page) to iframe page and yes, there will be multiple server calls and you'll need to suppress one by adding this to your tool custom code:

var isInIframe = (parent !== window)
if(isInIframe ){
return false; //this will prevent the Adobe Analytics tool to send a pageview image request
}else{
return true; //this will allow the Adobe Analytics tool to send a pageview image request
}

Thanks & Regards

Parit Mittal

Answers (1)

Answers (1)

Avatar

Avatar
Level 1
shubhis18659364
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
shubhis18659364
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
shubhis18659364
Level 1

10-06-2018

Hi Parit,

We have a parent jsp page which is calling another jsp( that has iframe content to it).

Can we add adobe tag management container to iframe? If yes, how?

Please reply.

Thanks,

Shubhi.