Design approach for collecting and storing user data from application

What is the best way to approach & implement a storage system and data pipeline for user metrics on an application, in the context of client vs. server side architecture?

An example of this would be recording dwell time, ie. recording how long a user spends with a specific post on their screen, and storing that in a server-side DB en mass.

Am also curious how the design would be impacted by storing many different events of different formats. (ie. dwell time, posts clicked on, etc.)