Skip to main content
filipeb99236397
Level 2
Jan 27, 2016 5:57 PM UTC
Solved

Tracking iframe form with DTM

Hi,

I am struggling in implementing some basic tracking on a page with an iframe form. The situation is as follows:

(1) I have a main page with iframe form
e.g.: www.test.com/something
(2) but the actual page where the form is located is e.g.: www.form.com/create

So basically the form on (2) is iframed into page (1). If i want to deploy DTM code so i can fire 3rd party tags and set up Adobe Analytics tracking as well on this form (through a DCR when form is submitted e.g.) how can i implement this?
Adding DTM code (header and footer) to the form page (2) will work?

This has been a tough battle and unfortunately i still do not have a clue on how to get this working

Thanks in advance for support

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
filipeb99236397
filipeb99236397Accepted solution
Level 2
Jan 28, 2016 3:32 PM UTC

Hi,

Yes, i'll add DTM code on iframe and also on parent page (where the iframe is in).

I'll have results by end of next week - will post them here

Thanks for support

5 replies

Amit_Kumar
Level 10
Jan 28, 2016 1:38 AM UTC

AdD the DTM header and footer to the Iframe.

Do let me know if that doesn't work.

Translate
filipeb99236397
filipeb99236397AuthorAccepted solution
Level 2
Jan 28, 2016 3:32 PM UTC

Hi,

Yes, i'll add DTM code on iframe and also on parent page (where the iframe is in).

I'll have results by end of next week - will post them here

Thanks for support

Translate
filipeb99236397
Level 2
Feb 10, 2016 9:12 AM UTC

Amit_Kumar wrote...

AdD the DTM header and footer to the Iframe.

Do let me know if that doesn't work.

 

Hi,

For anyone who is struggling with this, the approach works.

We just need to add the same DTM code (that we have on parent page) to iframe page/form... and voila.

Thanks for support

Translate
Feb 10, 2016 6:40 PM UTC

Filipe Beato wrote...

Amit_Kumar wrote...

AdD the DTM header and footer to the Iframe.

Do let me know if that doesn't work.

 

Hi,

For anyone who is struggling with this, the approach works.

We just need to add the same DTM code (that we have on parent page) to iframe page/form... and voila.

Thanks for support

 

 

Won't there be multiple server calls in that case?

Translate
filipeb99236397
Level 2
Feb 12, 2016 12:19 PM UTC

Mukesh Sharma wrote...

Filipe Beato wrote...

Amit_Kumar wrote...

AdD the DTM header and footer to the Iframe.

Do let me know if that doesn't work.

 

Hi,

For anyone who is struggling with this, the approach works.

We just need to add the same DTM code (that we have on parent page) to iframe page/form... and voila.

Thanks for support

 

 

Won't there be multiple server calls in that case?

 


Yes, that's right.

You'll need to suppress one by adding this to your tool custom code, that was kindly provided by Adobe:

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
}

p.s: Again this code was provided by Adobe

Hope this helps

Translate