Fix analytics preparation for badges