encode user data that is used for the modal ids