While testing a number of carpet stain cleaning products on grape juice stains, everything had trouble with an old dried stain, soda water did pretty well on a fresh stain but the surprise technique was to totally cover the stain with table salt and let it dry. Vacuum off the dry salt. Then clean it with ammonia.
The salt apparently drew much of the stain up into the pile of salt and also dissolved into the fresh liquid stain down in the carpet, creating a chemical mix that reacted well to the ammonia cleaner, much better than ammonia cleaner by itself either while the stain was wet or dry.
Of course you could take the colour out of a particular carpet with any cleaning technique, making things worse, so try the ammonia for colour fastness on a hidden part of the carpet before performing the final portion of this cure.