Last active
December 12, 2015 08:08
-
-
Save rjv/4741431 to your computer and use it in GitHub Desktop.
Simple Google Analytics event tracking wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var track = function(category, action, label) { | |
if (window.ga) { | |
ga('send', 'event', category, action, label); | |
} | |
else if (window._gaq) { | |
window._gaq.push(["_trackEvent", category, action, label]); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment