For me, the challenge is finding the right cleaner for the issue, that is ALSO non-toxic for the paws walking around bare on the surface.
So I always use OxyClean or Petastic to clean all of my rugs and carpets - even to sanitize stone. Petastic is a great natural enzyme cleaner and the best on the market. OxyClean can often lift a lot of fresher stains as long as they aren't set - even wine.
For even heavier duty, you can also use hydrogen peroxide - but test on colored carpet in an inconspicuous spot first.
Whatever you do - avoid shampoos and anything with actual detergent in them - those actually set in the carpet and attract dirt - making soiling a compounding problem and you never truly get them out of your carpets, once in.
I use Bissell cleaning products - including Proheat and spotbot...but if professional steam is needed, then I only consider and use ChemDry (non-toxic and soap free).