Skip to content

Instantly share code, notes, and snippets.

@niuage
Created October 24, 2011 22:59
Show Gist options
  • Save niuage/1310628 to your computer and use it in GitHub Desktop.
Save niuage/1310628 to your computer and use it in GitHub Desktop.
(function ($, context) {
var mpq = context.mpq,
sync_track = function (e) {
var self = this,
event = e;
event.preventDefault();
mpq.track('dashboard-interaction', {
'area': event.liveFired.id
}, function() {
window.location = self.href;
}
});
context.setTimeout(function () {
window.location = self.href;
}, mpq.metrics ? mpq.metrics.config.track_links_timeout : 300);
};
$(function () {
$('.mp-dashboard-track').delegate('a', 'click', sync_track);
});
}(jQuery, this));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment