Index: piwik.js
===================================================================
--- piwik.js	(revision 5287)
+++ piwik.js	(working copy)
@@ -1251,6 +1251,17 @@
 
 				lastActivityTime = now.getTime();
 			}
+			
+			/*
+			 * Get Abandon cookie. This cookie is only needed once at the beginning of the visit, remove once found.
+			 */
+			function getAbandonCookie() {
+				var trackAbandons = getCookie( getCookieName('abdn') ) !== 0 ? true : false;
+				if (trackAbandons) {
+					setCookie( getCookieName('abdn'), '', -1, configCookiePath, configCookieDomain);
+				}
+				return trackAbandons;
+			}
 
 			/*
 			 * Sets the Visitor ID cookie: either the first time loadVisitorIdCookie is called
@@ -1465,6 +1476,7 @@
 				// build out the rest of the request
 				request += '&idsite=' + configTrackerSiteId +
 					'&rec=1' +
+					(getAbandonCookie() ? '&_abdn=1' : '') +
 					'&r=' + String(Math.random()).slice(2, 8) + // keep the string to a minimum
 					'&h=' + now.getHours() + '&m=' + now.getMinutes() + '&s=' + now.getSeconds() +
 					'&url=' + encodeWrapper(purify(currentUrl)) +
