Apply baking soda: Sprinkle a generous amount of baking soda over the stained area. Baking soda helps to absorb moisture and odors. This will also help reduce spreading on the back side of the carpet.
The Family Handyman on MSN

How to Remove Just About Anything From Carpet

If you or your little one love slime, you’re bound to make a few messes with it. And it creates a wreck in your carpet fibers ...