1

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?

2
  • In general, anything placed within an iframe that you do not have access to, ie. you cannot change any content within the frame, you will not be able track.
    – nyuen
    Jul 15 '15 at 14:00
  • As nyuen indicated, you'd need to have access to the third-party code in order to track submit events. I suggested a solution here however using a transparent image positioned over the submit button in an iframe.
    – dan
    Jul 16 '15 at 0:44
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.