Les
The appearance of the stains in the photograph are consistent with the resoiling of an "invisible" residue. This could, for example, be something like a detergent, sugar, fat or oil. I gather that you have wet a sample and failed to produce a "foaming ball". This would eliminate a conventional high foaming shampoo residue, but not necessarily other types of detergent.
First
Do a pH test on a few spots, but be careful not to remove all of the spot. If the reading is heavily acidic or alkaline, treat accordingly.
If you have a pH reading in the neutral range, you will have little indication as to the nature of the soiling, so first pre-treat stains with a volatile solvent and towel/pad dry. Don't rub. This will help with any potential oily residue from non-volatile spotters, or white spirit or walked in fats, grease or oil. Then wet spot clean.
Clean carpets again with a detergent free formula, eg One Step Fineline to be Woolsafe, otherwise something like Pure Clean, Eco Gent, DFC, Solution 4(?), M Power Craftex M/S etc. etc. Then freshwater rinse. Agitate pre-spray carefully with a hand brush so that you can more easily detect if any spots are "foamy" or otherwise different to the others.
Other than this, I could not advise without an inspection.
Good luck.
Safe and happy cleaning

Ken