Capture web page validation errors
Can we capture validation errors using Adobe Analytics?
Can we capture validation errors using Adobe Analytics?
can we capture form validation errors using custom code?
Yes, though methods will vary depending on how the form is coded.
So first off, you need to identify how the form validation works... do users fill out the whole form and submit, if there are issues are they all provided at once? Or does each field do a live update as the user is actively filling out the form? Is it a combination of the two (as in there are live updates for formatting like dates, valid zip code, etc that trigger "live", vs an on-submit that will catch missing required fields, or other invalid selections)? Do you need to capture in detail all errors, or in general that the form had errors?
Basically you need to first identify how things work, and what you want to track.
Next, there are many ways to try and connect into these form validations.... sometimes it will be easier if you can get your developers to trigger an event that you can listen for; or to update a data layer with information you can leverage... Maybe you just want to have a "form submit" and watch for errors in a specific DOM element that indicates the form failure.... it really depends on your implementation and what works best for you.
Taking the above into consideration:
Will allow you to determine the best way to start your tracking..
But now comes the "how" to record the data. Depending on the granularity you need... I would be tempted to create an event for "form failure", I would pair this with either a custom link (if this is going to track as a separate action) / or an prop/evar (if this will be combined into the standard form submit where you want to separate success/failure; etc) to indicate a "general form validation error"... and IF you want to itemize all the potential failures... if you haven't already used up your 3 list variables, I would be suggest using one of them to track an itemized list of issues (since you can send all the issues here without worrying about truncation) OR if these are already in use, you might want to come up with a short form notation / numeric representation of the issues that you can send through a prop/eVar that you then map using classifications (the short form to prevent data truncation and the classification to expand these short forms back to a readable version for your reporting)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.