I'm trying to use the 'gform_page_loaded' hook to fire off a GA pageview whenever a multipage form is stepped through. But I can't for the life of me get the event to fire.
This is the code I (currently) have in place:
<script type="text/javascript">
$(document).bind('gform_page_loaded', function(event, form_id, current_page){
console.log("Event fired " + window.location.pathname + current_page);
_gaq.push(['_trackPageview'], window.location.pathname + current_page);
});
</script>
I have tried that, and inside a .ready() block. I have tried it on AJAX and non-AJAX forms. I've even put an alert() inside the event to double check it's not firing - no luck.
I have the latest versions of GF & WP. I'm not getting any errors. The event just doesn't fire (or doesn't get picked up by my code).
What am I missing? :(