For a project (react-native
redux
app) we would like to add tracking of user interactions. For example, tracking every toggle/button press. To do this, we have an async function that talks to an endpoint to log the information. I was wondering if there is a way of doing this in a generic way without implementing too much code. Our current solution is redux specific and thus we miss out on events that do not trigger a redux action (eg a button that doesn't do anything). Is there a way (without redux) to track user actions at component level, without having to manually call the function in the every components code?
A suggestion we got is to create a parent component (eq parent button for all buttons), that has built-in the tracking functionality. Is this something that could work, how would the implementation of this look?