First, it’s vital to get all of the sugars and solids out. So the absolute first thing to do would be a repetitive soaking with clean water (simple tap water), and blotting out with a sponge. The more times you do that, the more sugars and flavors you’ll be picking up each time. You have to remove the sugars, flavoring agents and any pulp or other solids that will provide a growth medium for mold, mildew and bacteria. That should all be done on day one.
Then make sure it dries properly. You may need to add heat, ventilation or both. You may need to find a way to raise carpet slightly from the floor (for example) to allow both carpet and metal floor to dry.
If there’s still odor, then it’s possible that the first rinsing step wasn’t effective enough. (If you own a pet who ever messes on carpet, then you’ll know how important it is to soak and blot, soak and blot, soak and blot to get everything up and out that can be gotten out.) But if you think that was done well and effectively, then try a raw potato cut in half and left on a plate (cut side up) for a day or two. (No longer, because a rotten potato smell isn’t a good mask for much of anything.)