Confirming: Tracking clicks also tracks user pressing "Enter"

Confirming: Tracking clicks also tracks user pressing "Enter"

This should be a simple question, but I want to track how many people hit "submit" on a form. I've been using a simple click tracking and want to confirm that it will register an event even when a user hits "Enter" and not just when they click with their mouse.

More technically I guess the question would be wehther "onmousedown" registers an event when the user hits Enter on their keyboard and not only when they click with their mouse.

Re: Confirming: Tracking clicks also tracks user pressing "Enter"

@DKHANAL1, we only capture "onmousedown" and not "onkeydown" for the click goal. Since you want to capture submit I would suggest writing a custom event to track "onsubmit"and that should capture both the clicks as well as key press.

Re: Confirming: Tracking clicks also tracks user pressing "Enter"

I have seen many tests that simply track the clicks on the form CTA button and ignore people who click enter inside the form to submit. This can lead to skewed results.

Another thing to remember is that submitting the form is not the same as it being completed successfully. Always ensure you have a goal tracking form 'submits' and 'successful completions'.

I have seen several tests where a variation won because it was supposedly getting more leads than it competitor variation, however, the competitor variation was actually get more successful form completions.

The more complex or more validation you have on your form, the more likely you are to get skewed results if you are not tracking the correct goal.

Re: Confirming: Tracking clicks also tracks user pressing "Enter"

And for simple forms such as an email optin, if you have a variation that say changes the copy above asking for email "Subscribe to my newsletter vs. Join 10,000 subscribers" would there be any reason the submit clicks % would be much different than the successful submission between A and B?

My thought is that if there's a difference between clicking and successfully submitting, that would be consistent between those 2 variations.

Re: Confirming: Tracking clicks also tracks user pressing "Enter"

I think the issue David raises centers around the form's validation of a successful vs. invalid response. Depending on how the form is implemented, the page may use simple inline JS to highlight errors, or the page may need to fully refresh in order for server-side validation to return some errors.

A reasonably simple approach ought to be to take the suggestion Shaunak raised above to capture (attempted) submits of both kinds, as well track a pageview goal on the true confirmation/thank you page that is seen only after a successful/complete submission. Dealing with one-page forms built n Angular or Drupal may be tougher, but the general idea is the same - track a goal against what the user sees only if and when they successfully submit.

Re: Confirming: Tracking clicks also tracks user pressing "Enter"

Do pageview goals register a "conversion" if the user goes to the "success" url RIGHT AFTER they visit the experiment page or if that unique visitor goes to the sucess page at any point in the future through any other means (as long as they still have their optimizely cookie)?

Example:

Say I'm testing copy on an opt-in form on a blog homepage. It goes to a "thanks for subscribing" page. I also have other opt-in forms on other pages (e.g. at the bottom of every post, etc.), those also go to the same thank you page.

If a visitor sees Variation A or B of the homepage opt-in form, doesn't opt in, but a week later they see a rand blog post and opt-in on a form at the bottom of that post, will my homepage opt-in form experiment register that as a conversion?

Re: Confirming: Tracking clicks also tracks user pressing "Enter"

A conversion will be tracked as long as the user has been bucketed into the experiment on the homepage at some point and has not cleared their cookies. The immediate following of the home page by the thank you page is not necessary.

Possible ways to mitigate this could be utilizing document.referrer (dicey) or setting a cookie specifically upon a home page form view/submission.