// track email link clicks jQuery("[href*='mailto:']").click(function(e) { e.preventDefault(); var href = jQuery(this).attr('href'); gtag('event', 'click_to_email', {}); setTimeout(function() {window.location = href;},500); });