Google Analytics with MVP Design Pattern

Which is better by putting google analytics code in the presenter or keeping them active?

+7
android mvp google-analytics
source share
1 answer

I think this should be delivered in the presenter, because View should not know anything about sending GAnalytics. The view should be as passive as possible, that is, it should only have tuning methods to update it when the presenter is called.

On the other hand, I had to associate one large project with GAnalytics with every possible action that you could imagine, and my experience is that it is easier to send GAnalytics from the View, because you can easily go to the definition of the / textView button and see its role in the user interface, which is impossible from the presenter, because it should not (should not) refer to any buttons / labels in the user interface (Activity). But this project was the old monolithic architecture of view-controler (fat actvity). These days I am working on MVP (pure architecture) and would like to hear other opinions on this topic. Relationship

-one
source share

All Articles