Dogs pee when they're excited or scared because of a reflex called submissive urination. This reflex is caused by the release of adrenaline, a hormone that prepares the body for fight or flight.
Submissive urination is more common in puppies than in adult dogs. This is because puppies are still learning about the world and their place in it.
Submissive urination can also occur in adult dogs. This is often due to past trauma or abuse. Dogs that have been mistreated may learn to associate certain situations with fear or anxiety.
Dogs may also pee when they're excited. This is called excitement urination. It is most common in puppies, but it can also occur in adult dogs.
It may take some time for your dog to learn not to pee when it's excited or scared. Be patient and consistent with your training.
If you get angry or frustrated with your dog, it will only make them more anxious and more likely to pee.
Submissive urination and excitement urination are both common problems in dogs. However, with patience and love, you can help your dog learn not to pee when it's excited or scared.