There are a docent of user tracking tools in the market: Branch.io, Oribi, Mixpanel, even Facebook (if you use their pixel.)
In fact, it is so easy that a desktop tracking implementation will take less than a day.
As fun as it can be to capture the user’s IP address, OS/browser, collecting the data is not the hard part. The real question is whether you should collect it in the first place, and what’s the purpose of it.
In a high-traffic website, let’s say 10k daily visits and ~100 avg. total events per user, you could be easily generating something between 30-50 GB worth of data per day.
What’s expensive is not the storage, but the computation time and the time will take for an analyst to go through the data.