ATMs could OCR and log the serial numbers of bills they dispense, and they obviously know who they're dispensing to. Banks could do the same with incoming cash at the end of the business day.
The tracking would be weaker than with electronic payments since some notes will be re-used after being given as change, but it'd still be useful to a government that wants to track its population.