Mobile app version of vmapp.org
Login or Join
Martha676

: Track SUBMIT button inside iframe with Google Analytics I have a lead generation site. I have placed a third party application form in an iframe on our site's application page. I want to track

@Martha676

Posted in: #GoogleAnalytics #Tracking

I have a lead generation site. I have placed a third party application form in an iframe on our site's application page. I want to track how many visitors are clicking on GET FREE QUOTES buttons. In short I want to track all the leads filled from this site within this iframe.

Can anyone please guide me on this?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Martha676

1 Comments

Sorted by latest first Latest Oldest Best

 

@Berumen354

Unfortunately under the circumstances you have advised this is not possible. For security reasons cross origin iframes do not allow javascript from the parent frame to interact with the child frame and so there is no way to detect any event within the iframe itself. As @dan indicates in his comment he has identified a solution here which uses a transparent image positioned over the submit button in the iframe but that is very much a messy hack and may not work all the time depending on how it is implemented and positioning, etc.

Some vendors enable cross origin resource sharing (CORS) on their iframe pages so as to enable access to the child frames DOM though it is unlikely in your case I suspect, others enable javascript based API's which trigger events which can be captured in the parent frame when something in the child frame is done. The easiest way to achieve this is to speak to the specific vendor in question and ask them how you can track the button clicks and if they even support it, and if not is it something that they would consider investigating as a later enhancement to their widget.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme