PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Can't get 'gform_page_loaded' to work

  1. 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? :(

    Posted 12 years ago on Friday February 10, 2012 | Permalink
  2. Hi Chris,

    Could you share a page where you have this implemented? I'm optimistic that we will be able to better pin point the issue if we can see the full source. Make sure you are applying this to a multi-page form with AJAX enabled.

    Posted 12 years ago on Wednesday February 15, 2012 | Permalink
  3. Hey David,

    Thanks for the reply. Here's one form setup to do it: http://www.easyabnregistration.com.au/company-abn-registration-form/

    That form has AJAX enabled, but the event still doesn't fire....

    Ultimately what I'm trying to do is track form abandonment. If there's an alternative way to do it, I'm open to suggestions!

    Posted 12 years ago on Thursday February 16, 2012 | Permalink
  4. Hi Chris,

    Hm, I didn't see anything out of sorts with your setup. Could you send us a WP login and FTP access so I can dig into this a little more? You can send these details to us via the contact form. Be sure to reference this post so we can keep track of the previous history.

    Posted 12 years ago on Thursday February 16, 2012 | Permalink
  5. Done David, thanks. Sorry didn't get a notification of your reply.

    Posted 12 years ago on Monday February 20, 2012 | Permalink
  6. Resolved via Priority Support.

    Posted 12 years ago on Tuesday February 21, 2012 | Permalink

This topic has been resolved and has been closed to new replies.