I have an Ionic 3 application and I need to log everything that user does in the application such as the button that user clicks or the page that user enters etc. After that, I am going to send these logs to the database. I tried to do this with HostListeners but it makes things confusing. Because even I click onto an empty space, it still continues to log. Acutally, I don’t want to write function to every single function into app, beucase I have already over 300 functions. So, I am curious about if there is any best practice for this situation or not. Thank you for your help!
23 Answers
if you want to save user actions in your database then you need to look every actions manually. In that case use following things. You need to track every events that user went through including: Click, Mouse hover, Page change etc.
Or if you want to add third party analytics then you can use following:
2Simple log file appender for Ionic 3.
3user fire-base analytics to save user logs here is link how to save link