Skip to content

Instantly share code, notes, and snippets.

@bavington
Last active October 3, 2018 17:57
Show Gist options
  • Save bavington/7880004 to your computer and use it in GitHub Desktop.
Save bavington/7880004 to your computer and use it in GitHub Desktop.
Pushing custom events to Google Universal Analytics (analytics.js).
jQuery(document).ready(function ($) {
$('#navquote').on('click', function() {
ga('send', 'event', 'Quick Quote Call To Action', 'click', 'Launch Lightbox Form');
});
$('#headerphone').on('click', function() {
ga('send', 'event', 'Phone Number Touch/Click', 'click', 'Header');
});
$('#footerphone').on('click', function() {
ga('send', 'event', 'Phone Number Touch/Click','click', 'Footer');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment