Setting up a DTM code in an iframe
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.
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.
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.