Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Unable to track my form fields abandoned by the user

Avatar

Level 2

Hi,

in my site I have many registration form types.

I want to track the field names which users left the registration form without completing it. I also want to save my server calls.

I used tab blur solution where form field values get stored in cookies and sent to analytics when user click on any other page of the site.

However I am not able to capture the data if user has left the page by closing it completely and dint return.

How should i make i tracking solution for this scenario?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Dear Arun Kumar,

You can use window.onunload (As Gauresh pointed)or window.onbeforeunload (I would prefer) to read the cookie value and trigger the set of code you have. But both are browser dependent i.e. wont work on all the browsers and increase one more server call.

Thank You!

Arun

View solution in original post

6 Replies

Avatar

Community Advisor

Dear Arun Kumar,

Regarding Form Abandonment, if the user navigates to different page of your site before completing the form, as you said you can store it in a cookie and capture the value in next page correlating the previous page value.

If the user close the browser or tab directly, you didn't have any solution and it is not possible to track the abandonment. Using JavaScript onbeforeunload event, you can detect browser or tab close event but it is not supported by most of the browsers.

Thank You!

Arun

Avatar

Level 2

Hey Pratheep,

Does this mean there is no way to track the user activities who left the registration page and dint return in adobe analytics?

Is it possible to get the  field interactions using data layer and using data layer will we be able to resolve the above mentioned scenario?

do you recommend to create an additional pop up (confirm window ) on registration pages. can that be helpful.

Avatar

Community Advisor

Dear Arun Kumar,

Though we capture the interaction through Data Layer, we need to trigger the Analytics Call while abandoning right? Abandonment may be either the user navigate to other page, close the tab or close the browser. If it is unable to track the close the tab or close the browser, it is upfront that it is not possible to track the abandonment during the instance.

I don't think there is a simple workaround.

Won't recommend for additional Pop-up since we can still close the browser leaving the pop-up open.

Thank You!

Arun

Avatar

Level 2

Thanks Pratheep,

I completely agree with your view points.

Okay is there a way to read the cookies values on unload event?

if any work around or script available on this I will be testing out few scenarios.

Avatar

Employee Advisor

hi PratheepArunRaj​ @arun kumar

Maybe this can work to capture window close event,

window.onunload = function()

{

if ((window.event.clientX < 0) || (window.event.clientY<0)) // close button

{

alert("Window Closed");

}

else if (window.event.altKey == true) // ALT + F4

{

alert("Window Closed");

}

else // for all other unload events

{

alert("unload event");

}

}

Thanks,

Gauresh Kodag.

Avatar

Correct answer by
Community Advisor

Dear Arun Kumar,

You can use window.onunload (As Gauresh pointed)or window.onbeforeunload (I would prefer) to read the cookie value and trigger the set of code you have. But both are browser dependent i.e. wont work on all the browsers and increase one more server call.

Thank You!

Arun