Added analytics message to db writing.