I have google analytics set on a site I’m working on, It has a form that connects to a webservice, that is being sent with Ajax to a php script. the php script sends the request to the web service, then the response is parsed to determine success or failure.
I want to fire an event tracking on the condition of success and only success. I can place the event tracker on the submit button, but we want to only track successful submissions. Any idea how to achieve that?
Best
Using Analytic’s Javascript SDK fire the event after you have parsed the AJAX response from the web service and determined it to be successful.