Before doing anything else, if the area is still wet, be sure to blot the urine stain with a clean towel. You can also use paper towels to help absorb any remaining urine. To prevent further absorption, the faster you do this, the better.
If you have access to any kind of shop-vac, use it to extract any remaining urine. If you don’t have this tool, proceed to the next step.
Take one-quarter teaspoon of liquid dishwashing detergent and mix it with one cup of warm water. Be sure to specifically use this kind, not laundry detergent or dish soap; these may contain bleach or lanolin.
If you have a spray bottle, pour the solution into it. Spray the urine stain, aiming directly onto the carpet.
If you can extract the solution from the carpet using a shop-vac, this is a good next step. Otherwise, you can use a cotton cloth or paper towels after the solution has set into the stain.
After rinsing the area with warm water, repeat steps 1-5, as long as you’re seeing the urine stain gradually fade.
Last, take two tablespoons of ammonia and mix into a cup of water. Rinse and repeat until the stain has disappeared