form abandonment on Close of Browser button | Community
Skip to main content
pradeep_07
Level 4
August 31, 2022
Question

form abandonment on Close of Browser button

  • August 31, 2022
  • 2 replies
  • 1532 views

We are tracking form Abandonment as event when user click any link within the page and also last accessed field has been captured via Data Layer.

 

Is there any way we can track form Abandonment when user click browser close Icon or abandon the page and open separate browser  tab?

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Pradeep_Kumar_Srivastav
Community Advisor
Community Advisor
August 31, 2022

Hi @pradeep_07 , Adobe Consulting offers a form abandonment plugin that you can use. You can create a calculated metric like form start or complete which should give you form abandonment rate and form start - form complete to give you how many form where abandoned. If the user navigates to different page  before completing the form, you can store it in a cookie and capture the value in next page correlating the previous page value.

 

Also, If the user close the browser or tab directly, you can't  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.

 

Hope this helps.

 

leocwlau
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 1, 2022

It mostly rely on the beforeunload or unload event which is the trigger to track as the visitor is leaving the current page. However, you need to note that there are supporting issues for both events that they are not reliably fired, especially on mobile.

Since you already track the same when clicking on any link on the page, the browser closing is just the same but you will rely on the beforeunload/unload event. However, there are two more points you need to be aware:

  1. beforeunload/unload event will be fired even when the user clicked on any link to navigate away from the page, which is a duplication of your existing tracking, so you may want to keep only the beforeunload/unload event approach
  2. tracking is network traffic to the adobe data collection server, there is a chance that the network traffic didn't finished before the browser is closed such that the tracking will be lost. This is applicable to your existing link click tracking as well but my impression is that this problem is more serious when closing the browser than a link click navigation. So it is better to use the 'useBeacon', https://experienceleague.adobe.com/docs/analytics/implementation/vars/config-vars/usebeacon.html?lang=en, approach to send the data.