Mobile app version of vmapp.org
Login or Join
Hamm4606531

: Google Analytics Goals with AJAX Functionality? I have some nice ajax contact/enquiry forms etc on a website I'm working on which are working great (and degrade gracefully). I'd like to make

@Hamm4606531

Posted in: #GoogleAnalytics

I have some nice ajax contact/enquiry forms etc on a website I'm working on which are working great (and degrade gracefully).

I'd like to make use of Google Analytic's 'Goals' feature. The trouble is, the only way I can see this could work for my form is if it redirected to another page (be it a thank-you page or similar) after submission, then I can enter that url at a page people only visit after they've submitted my form. I can see how this would work for my non-JS visitors (if any even have it disabled!), but is there any way to track when an AJAX form has been submitted?

Thanks

Edit: I should add that I know I can work out manually the conversion rate and so on/so forth by the number of enquiries I receive, but why not try and make things easier for mysef? :-)

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamm4606531

1 Comments

Sorted by latest first Latest Oldest Best

 

@Murray155

You could use Google Analytics' functionality to log a pageview for non-existent page URL when your form is submitted. This fake URL can then be used in your goal.

The code for logging a fake pageview is as follows:

_gaq.push(['_trackPageview', '/fake/page/url'])

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme