With apple annoucing more and more privacy features on their mobile safari and GDPR it is more and more complicated to get information how a is using out product. A possible solution is stepping back and implement your own tracking on your own server.
This article describes a server side approach where all data is stored project/vendor owned infrastructure. The solution is PHP based but should be easy to adapt in node or java.