A QR code is an encoded piece of text, the text can be of a recognised format (by the reader application, normally on your phone or similar device) and can then be treated as a url, vCard, map location, etc. QR codes are not tracked, are you thinking of RFID?
It is very unlikely that you would store the QR code. There is a Google chart api to generate the images and I'm sure you can purchase a server side widget of your own or use the xzing library if that floats your boat.