Made analytics a constructor, added config.analytics