Last active
December 6, 2016 18:06
-
-
Save EdwinGuzman/8281b80fac53b7c2e1a19826b5060d62 to your computer and use it in GitHub Desktop.
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
import ga from 'react-ga'; | |
function GaUtils() { | |
// other GA related functions | |
this.trackEvent = category => | |
(action, label) => ( | |
// using ES6 object shortcut notation | |
ga.event({ | |
category, | |
action, | |
label, | |
}); | |
); | |
} | |
export default { | |
gaUtils: new GaUtils(), | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment