Very open architectural question.
I have an Android offline app.
In one of the actions user can change a configuration, in my specific case it is the day of the forecast.
So to do that, the flow is this:
The actual effect will happen in parallel (no important for my question).
My questions are:
Where is the best place to add the analytics track?
What exactly should I be considering when positioning my analytics track events?
Just in case, this is the app I'm talking about: https://play.google.com/store/apps/details?id=pozzo.apps.travelweather
Thank you
Analytics is part of the domain layer, so It should ideally be kept in the domain layer. Often projects have analytics in the view layer (ViewControllers, activities or fragments or ViewModels). This leads to inconsistency and analytics calls are often fired from views or view models, controllers etc.
Therefore, it is ideal to keep analytics inside UserCase/interactor classes, these are often re-usable classes, which makes logging easier with less duplication.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With