My guess RFID. By one regular pod, cut RFID chip out of it, tape to the bottom of subsequent generic pods.
FWIW we tried that with our Stratasys 3d printer. It remembered the RFID number and remembered that the print cartridge was out of print material, so sticking the rfid tag to a new, third-party, 1/4 the price, filled to the brim container of print material did precisely nothing for us. I have no idea if the keurig will do the same. Oh, it was also a pain in the butt because they'd built it into the side of the cartridge, so when we cut it out it wouldn't simply stick on the new cartridge as it had a flat side and the resultant cartridge+rfid tag wouldn't fit in the printer, so we had to bodge something up by putting it on the front where the door closed and hoping it would be detected. It was, but see above.