Skip to content

Instantly share code, notes, and snippets.

@EdwinGuzman
Last active December 6, 2016 18:06
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 EdwinGuzman/8281b80fac53b7c2e1a19826b5060d62 to your computer and use it in GitHub Desktop.
Save EdwinGuzman/8281b80fac53b7c2e1a19826b5060d62 to your computer and use it in GitHub Desktop.
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