Last active
November 9, 2016 16:39
-
-
Save gquemener/2c9b65bae7ee2226f3244e704a998e05 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
export default class GAEventTracker | |
{ | |
constructor(ga) { | |
this.ga = ga; | |
} | |
track(action, label) { | |
this.ga('send', 'event', 'Catalog', action, label); | |
} | |
} |
This file contains hidden or 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
const FILTER_BY_NAME = 'FILTER_BY_NAME'; | |
filterByName(name) { | |
return (dispatch, getState, eventTracker) => { | |
eventTracker.track('filter by name', name); | |
return { type: FILTER_BY_NAME, name }; | |
} | |
} | |
export default { | |
filterByName | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment