- Issue created by @ericmulder1980
We have built a community platform where users can send each other private messages. We are using Tag Manager to anonymously measure certain activities on the platform such as creating new content and leaving comments. We want to measure the usage of the private message system in the same way. We do this by adding extra event handlers to forms or submit buttons. For private messages this does not seem to work because click handlers and form submit handlers are never fired after the ajax request has completed.
Try to bind a custom click handler to the submit button or submit handler to the form. Add some console.log('blah') and find out your handlers are never fired.
I know adding custom handlers to ajaxified forms has always been somewhat challenging in Drupal so i am not really sure how to proceed on this one. Looking at different sources one way to tackle this is to register the ajaxSend or ajaxComplete event to allow custom javascript to hook into this event. I hope someone here will have a proper understanding of the Ajax callbacks to come up with a solution.
Come up with a proposed solution first.
None
None
None
Active
3.0
Code