Make a paste of baking soda and warm water, rubbing this paste into the carpet and then sprinkle some additional dry baking soda over the carept and let this sit for a few hours. When the paste is dry, vacuum it up, and scrape as needed to remove all the paste. This removes the smells that you thought would be there forever!
When ever a carpet needs a freshen up, do the same sprinkle baking soda over the carpet. Then vacuum up a few minutes later. It stops your vacuum from smelling too!