I see that most of the `don't use mongodb for analytics` are being down-voted, however I tend to agree with them. For all the people out there looking for the database for analytics please check Clickhouse from Yandex, it's easy to get started, amazingly fast and open source.
Disclaimer: I am not affiliated with Yandex in anyway, just a happy customer
Disclaimer: I am not affiliated with Yandex in anyway, just a happy customer