src/js/tracker.js
/*
		 * Add click listener to a DOM element
		 */
Add click listener to a DOM element
Add click listener to a DOM element
function addClickListener(element) {
			if (linkTrackingPseudoClicks) {
				helpers.addEventListener(element, 'mouseup', getClickHandler(linkTrackingContext), false);
				helpers.addEventListener(element, 'mousedown', getClickHandler(linkTrackingContext), false);
			} else {
				helpers.addEventListener(element, 'click', getClickHandler(linkTrackingContext), false);
			}
		}
function addClickListener ( element ) { if ( linkTrackingPseudoClicks ) { helpers . addEventListener ( element , 'mouseup' , getClickHandler ( linkTrackingContext ) , false ) ; helpers . addEventListener ( element , 'mousedown' , getClickHandler ( linkTrackingContext ) , false ) ; } else { helpers . addEventListener ( element , 'click' , getClickHandler ( linkTrackingContext ) , false ) ; } }
Add click listener to a DOM element
Add click listener to a DOM element
// for simplicity and performance, we ignore drag events