Make analytics module return a constructor