1. Hire a carpet cleaning companies that use a treatment on the carpet to help neutralize the odors if standard cleaning does not work.
2. If the problem is in the subfloor, then a combination of things might help. There is a product called Nature’s Miracle which help neutralize multiple types of enzymes of the stain and/or odor. After that has been applied, the next step is to use a shellac based primer to permanently seal in the remaining odor.