how to implement rules and events for form tracking in adobe Launch?

574 Views Asked by At

I am new to adobe Analytics. I am trying to track form errors that are occurring when the user submitting the form without filling the required fields.

So here what I did was, passed form values to list prop to capture the values. But I am not getting how to implement events to track against these values.

Can anyone please help me with how to implement rules and events in the adobe launch for tracking?

1

There are 1 best solutions below

0
On

Yes, there are a few ways to do it.

The recommended way is to ask the Front-end team to send an error event that Launch can listen to. It can be done in a few ways. It's considered the best practice to install the adobeDataLayer extension: https://experienceleague.adobe.com/docs/launch/using/extensions-ref/adobe-extension/acdl/overview.html?lang=en

The extension provides ability to use a dataLayer very similar to GTM. Very comfortable.

The other way to do it is ask the devs to send a simple JS customEvent with error details in the detail property of the event.

Launch can natively listen to JS events and gives access to the event object.

Finally, the worst kind of implementation, that should be mostly considered as a hack, is the become visible trigger: enter image description here you're supposed to detect the actual error message with this trigger. I suggest not using it since the enters viewport listener is a bit heavy. And it also depends on the DOM structure since you'll have to provide the CSS selector for the error message.

This is not all, surely. You can build your own settimeout polling logic to look for the errors manually, or ask devs to send direct calls, but those are even worse solutions, so I'm not elaborating on them.