Commit f0f27ea5 authored by hass's avatar hass
Browse files

Issue #1580144 by hass: Links not tracked in some browsers as jquery

click event exits before tracking code finishes
parent 48ab3150
......@@ -4,8 +4,9 @@ Drupal.googleanalytics = {};
$(document).ready(function() {
// Attach onclick event to document only and catch clicks on all elements.
$(document.body).click(function(event) {
// Attach mousedown, keyup, touchstart events to document only and catch
// clicks on all elements.
$(document.body).bind("mousedown keyup touchstart", function(event) {
// Catch the closest surrounding link of a clicked element.
$(event.target).closest("a,area").each(function() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment