I think if something like this were implemented you could store a boolean or something (1 or 0), for if they want their stats visible. That way you could keep track, and while they are set to invisible, they wouldn't be loosing stats in case they should decide at a later date, that they want those stats visible.
When the public stats are displayed, it would only query the stats from the users who want it visible.