in this post How to capture click event with jQuery for iframe? I found a reference on how to execute something when visitors click inside an iframe using jQuery and the following jQuery plugin : https://github.com/finalclap/iframeTracker-jquery.
It consists in selecting the corresponding iframe with a jQuery selector and set a callback function that will execute myFunction :
jQuery(document).ready(function($){
$('.frameid iframe').iframeTracker({
blurCallback: function(){
// Execute myFunction
}
});
});
My problem is that I have an external iframe inside my page which display a form with inputs and 2 buttons: the "Back" button located at the bottom left corner of the iframe and the "Next" button located at the bottom right corner of the iframe.
What I would like to ask is how to execute myFunction (that should record a conversion in google analytics) after recording a number of click (let's say 5 clicks for example) on the "Next" button (or around its region as the "Next" button moves slightly when going forward inside the form).
Hope you can help. Thanks very much.