Added AnalyticsService functions.
Added analytic log message to db writing.