[OPINION] Canada’s age-verification bill for porn is a slippery slope to a restrictive internet
(www.theglobeandmail.com)
Your code would still be unchanging and unique to you, which would be easy to correlate activity with. It's basically a government-issued ID number.
And if it could somehow be anonymous, there's nothing to stop people from sharing it. It just becomes a password you need to access the internet, except all sotes must accept any of 20 million passwords, and you definitely know a bunch of people who will share.