quartzmo / email-landing-page

Bootstrap-based, Heroku-ready, easily customizable marketing landing page that integrates with MailChimp. Simple Sinatra server app.
http://landingpages.herokuapp.com
153 stars 77 forks source link

Ajax signup does not easily allow analytics tracking #2

Open quartzmo opened 11 years ago

quartzmo commented 11 years ago

The ajax signup action is nice for the user, but a separate congratulations or thank_you page would make it easier to track signups in analytics software without custom javascript.

nickhammond commented 11 years ago

Could always just add event tracking for the subscribe button too, that's what I ended up doing. Be nicer to bind it to the submit event of the form though.

<input type="submit" value="Sign up" onClick="_gaq.push(['_trackEvent', 'Actions', 'Sign up', 'Submitted the signup form']);"/>

Reference: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide

nickhammond commented 11 years ago

I just added this in my fork, wasn't sure yet what you had in mind for implementation details so I didn't submit a pull request.

https://github.com/nickhammond/email-landing-page/commit/d86734f79c8c4e62ba5d7ad78417116635f73cee

quartzmo commented 11 years ago

My implementation idea was to keep things super basic and friendly to any analytics solution by replacing the ajax form with a full page (re)load on submit. The ajax is nice but signing up is such a big event that I'm sure any user will be ok with full reload. (The main goal of this project is to avoid embedding a mailchimp form and going to mailchimp's site for the success/error screen.)