Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Track Form Submission Data in iFrame

Avatar

Level 2

Hello,

On our website we are loading a form to a page via an iframe: (http://www.medline.com/clinical-solutions/empower/more-info/)

Trying to figure out what code we need to implement within the iFrame to collect data on the submit button.

Any tips/help appreciated.

Thanks,

John

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi John, since your iframe and parent are on the same domain, you should be able to use window.parent in the iframe to access the s object and s.t() call defined on your main page. From there, you can update your SendForm() function to verify the form data, set variables on the s object, and then call s.tl() directly (you probably don't want to call s.t or you'll get two page views).

View solution in original post

3 Replies

Avatar

Correct answer by
Employee

Hi John, since your iframe and parent are on the same domain, you should be able to use window.parent in the iframe to access the s object and s.t() call defined on your main page. From there, you can update your SendForm() function to verify the form data, set variables on the s object, and then call s.tl() directly (you probably don't want to call s.t or you'll get two page views).

Avatar

Community Advisor

Hi John,

 

You will want to use custom link tracking on the onClick event of the submit button.

The documentation is here. : http://microsite.omniture.com/t2/help/en_US/sc/implement/index.html#Manual_Link_Tracking_Using_Custo...

Let me know if you have any question

 

Best regards.

 

Alexis

Avatar

Community Advisor

Hi John,

 

Please check : http://helpx.adobe.com/analytics/using/appmeasurement-iframes.html

And you most likely will want to use custom link tracking to track data when you click on button, so s.tl() call : http://microsite.omniture.com/t2/help/en_US/sc/implement/index.html#Manual_Link_Tracking_Using_Custo...

Best regards.

 

Alexis