I shared on here a while ago about the smell in my carpet that I suspected was caused by the dog from the previous owner of the house.
Initially we soaked the carpet with Simple Solution Stain and Odour Remover, which worked quite well but not completely.
After that we tried 1001 Carpet Fresh (which is a foam in a can), and it has worked really well. I can't recommend it enough!
We've now put it to work on some curtains, where it's worked much better than Fabreze.