Stop repeating myself: Similar pattern used on multiple event handlers
Id suggest something like:

$('body').on('click.alert.data-api', '[data-dismiss="alert"]', function () {
  trackEvent('Alerts', $(this).next().text());
});


instead of the whole alert code, and similar things for the other items.