email-landing-page icon indicating copy to clipboard operation
email-landing-page copied to clipboard

Ajax signup does not easily allow analytics tracking

Open quartzmo opened this issue 13 years ago • 3 comments

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.

quartzmo avatar Nov 11 '12 01:11 quartzmo

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 avatar Nov 13 '12 15:11 nickhammond

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

nickhammond avatar Nov 13 '12 19:11 nickhammond

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.)

quartzmo avatar Nov 13 '12 22:11 quartzmo