How to implement form error tracking and need to capture user status

parth_gupta199
Silver Contributor
Silver Contributor parth_gupta199

Hi Everyone,

In launch and DTM we can use direct call rule. What we can use in tealium in place of this. 

1. I need to track all the errors which user commit when submitting the form and need to capture the same in click event call (This call will come when user click on submit button of the form). Attaching the sample form as well.

dummy form.PNG

2. Need to track user status(logged IN/ Logged OUT) when user enter the site after submitting his/her credentials. what strategy need to be used here, do we required the help of developer?

Thanks,

Parth

 

4 REPLIES 4

How to implement form error tracking and need to capture user status

parth_gupta199
Silver Contributor
Silver Contributor parth_gupta199
And all these errors are occurs when user click on submit button. Can anyone guide me how to implement this event tracking.

How to implement form error tracking and need to capture user status

Tealium Expert
Tealium Expert

Hi @parth_gupta199 

For 1. you can use Event Handler extensions and tell it to listen to a Click event.

Product documentation is here: https://community.tealiumiq.com/t5/iQ-Tag-Management/Firing-Non-Page-Load-Tags-Using-the-jQuery-Hand...

You can add your own script to the custom template to check for the presence of error messages and fire a tracking call with the details.

For 2, is there something in the data layer you can get hold of to give an indication of logged in or out?  If not, is there something on the page you can look for? For example, if a customer is logged out, then there might be a log in button you can look for.  Or if they are logged in then either an on page greeting or log out button.  If so, you can write a JS extension to look for the presence of these elements and set a data object appropriately.

Hope that helps

Ben

How to implement form error tracking and need to capture user status

parth_gupta199
Silver Contributor
Silver Contributor parth_gupta199

Thanks @BenStephenson  for the quick reply!!

For 2, If developer put status: 'logged_in' in data layer, on click of login button. Then which extension i should use here? As i will be making extension on click of login button only. (There can be delay in sending value to data layer and my rule may not fire.) And what approach should be use in extension.

Highlighted

How to implement form error tracking and need to capture user status

Tealium Expert
Tealium Expert

Hi @parth_gupta199 

You can add an event handler extension to capture the click of the log in button and read the data layer. 

Or the developer could add the utag.link() call directly to the button and pass in the appropriate data layer.

For something like this I'd probably recommend having the "logged_in" data layer property on every page, and set to "true" on pages post log in and "false" on pages pre log in.  That way you don't have to respond to the click, but capture it on each page.