Car or dog pee is not an easy thing to deal with and in many cases without extraction is almost no way to get it out as it will just be in your carpet and underlay if not extracted and dealt with some ammonia and antibacterial treatment. I’ve been faced with this sort of stains more then once and every time it requires loads of treatment and right type of chemicals as no one solution will be effective on all types of carpets or surfaces.
When it comes to diy solutions it may not be very effective but there are solutions out there that are relatively safe and can provide some reasonable results. Ginger with water is a good solution as it will dissolve some of the bacterial problems with urine. Furthermore one has to deal with actual stain as well which is not easy if it is on the wool carpet or some of the carpets that have very bright colours as they will prove difficult.
Furthermore you want to be very mindful not to use any bleach on 6our carpets as those will definitely destroy your lovely carpet. Always be mindful with carpets as they are like your clothes in a way.