Skip to content

Instantly share code, notes, and snippets.

@TemporaryJam
Created June 2, 2015 06:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TemporaryJam/c068822f8e36e5699090 to your computer and use it in GitHub Desktop.
Save TemporaryJam/c068822f8e36e5699090 to your computer and use it in GitHub Desktop.
function fireGaEvent(category, action, label, value)
{
if (null === category) {
category = 'Professional Learning';
}
if (ga) {
if (value !== undefined && value !== '') {
ga('send', 'event', category, action, label, value);
} else {
ga('send', 'event', category, action, label);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment