- Event name is following [this convention](Naming conventions: one step towards clean data) an
Object-Action Framework
eg.- Object:
Account
, Action:Signed Up
- Object:
Post
, Action:Created
- Object:
- Following that, means we can separate module (file) by object. eg.
account
has its own module. - in each module, we can implement the detail about the tracking
- params
- transformation (if needed)
- if the tracking function seems do similar transformation before every calls, consider moving those logic into the tracking function itself. (eg.
post.engaged
) - if the tracking depends on state changes, consider creating a component with hook in it to capture state changes from the context, app state, or any global-ish state (eg.
ProfileUpdateTracker
)
Created
January 4, 2021 08:00
-
-
Save iboss-ptk/85f7a739e86fe5e29023ca09263288d1 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment