I am trying to send a SignUp success tealium_event upon successful Sign Up. I am using JQuery onHandler with 'custom' tracking event option that fires on 'click' of the Sign Up button based on its id as a JQuery selector. In that, I have used if condition that is checking the visibility of error messages, regEx for email validation and checking whether fields are not null before sending a utag.link() call with event data: tealium_event = "signup_success"
It is working fine for all scenarios except one. When I try signing up using an existing email then the page refreshes and the 'The email already exists' validation is shown in a new page view. How do I ensure that I cover this scenario too? The above scenario is incorrectly passed as a success as during the click event the form validation message is not visible.
Can I handle this somehow in this extension itself or it will need a separate extension? Is it possible to handle this in a single page view? If yes, what kind of flags I can ask the dev team to populate dynamically to handle this in a single page view?
If it's not possible to track it in a single page view then what is the workaround? Is utag.view() to be used somehow?
Similarly, I am facing the same issue for a scenario of 'Email doesn't exist' while tracking Login success.
P.S.: Event Tracking Implementation is done using HTML5 data attributes (action, category, label).