The revised (OO) AnalyticsService has an SRP violation. It knows:
- How to capture analytics
- When it should and shouldn't turn itself off
A more OO approach would to remove the second responsibilty and have something like the above where you have an that is object repsonsible for configuration.