Skip to content

Instantly share code, notes, and snippets.

@alexbeletsky
Created November 17, 2017 13:33
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 alexbeletsky/2d2fbdbd67cf7f448e928087f005a84e to your computer and use it in GitHub Desktop.
Save alexbeletsky/2d2fbdbd67cf7f448e928087f005a84e to your computer and use it in GitHub Desktop.
export function trackable(action, event, properties = {}) {
const analytics = {
eventType: event,
eventPayload: properties
};
return { ...action, meta: { analytics } };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment