Tag resource recovery from wastewater