I have extensive experience with pet stains from owning rental properties....
Urine smells MUST be treated with alcohol.... saturate the carpet all the way through the carpet and pad down to the subfloor. When it dries, the odor will NO LONGER be there and will NOT return under any circumstances. If your carpet is over hardwood floors, any pet urine will leave a stain on the hardwood that cannot be sanded out. BUT, if you saturate with rubbing alcohol and allow it to dry completely, your pet will not return to the same spot. I also treat feces stains with alcohol so there won't be any odor, but after you've cleaned up the hard mess, and shampooed the spot, just treat the carpet part with alcohol.. you don't have to saturate down to the pad. You can also purchase enzymatic stain removers at the pet stores. It will say enzymes on it... but alcohol acts in the same way and is much cheaper.