Your dog is housetrained. Then a guest walks in, or you come home. There is a small wet patch on the hall floor and a dog crouching in it.
Two different things look identical on the floor
The first is excitement. A young dog goes up fast at an arrival, and bladder control is one of the first things to go when arousal climbs.
The second is appeasement. A dog who feels overwhelmed by a person leaning over them crouches, tucks their tail, licks, and leaks a little. It is social signalling, and it is the opposite of a dog being difficult.
Both are common in adolescent dogs, and both usually fade. Neither is your dog forgetting where the bathroom is.
Safety note
Call your veterinary practice before you treat this as a behaviour problem. Call today if the leaking also happens when your dog is asleep or standing still. The same applies if they are drinking more than usual, straining, or licking at themselves. Sudden behaviour change warrants a veterinary examination, and pain frequently presents as a change in behaviour rather than as obvious lameness. Urinary problems are common, treatable and easy to mistake for excitement.
The one thing that makes it worse
Telling your dog off, or making anything of it at all. Punishment-based approaches are associated with fear, avoidance and defensive aggression, and a dog who is already appeasing will do more of it, not less.
Clean it up without comment, out of your dog's sight if you can manage it. Reward-based methods are what the veterinary behaviour guidance recommends here, and in this case the reward is mostly a quieter arrival.
Change the arrival, not the dog
Take greetings outside for the next 2 weeks. A puddle on grass costs you nothing and removes the whole cleanup.
Come in and do something else first. Hang your coat up, put your bag down, and greet your dog 2 minutes later once the peak has passed.
Crouch or turn side-on rather than leaning over your dog, and stroke their chest rather than the top of their head.
Keep your voice flat and low. The high, delighted voice is the one that produces the puddle.
Scatter 5 pieces of food on the floor as you come in. A dog with their nose down is a dog whose arousal is coming off.
Brief your guests in one sentence
Ask them to ignore your dog completely until they are sitting down. No eye contact, no hello, no hands.
Have your dog behind a gate with a chew for the first few minutes, so the arrival happens without them in it.
Let the greeting happen 10 minutes in, on the floor, with your guest sitting rather than towering.
Do not have people bend down and get in your dog's face to prove it is fine. That is the exact posture that triggers appeasement.
Working below the point at which your dog tips over is the condition for anything new being learned at an arrival. Every greeting your dog gets through dry is a rep in the right direction.
If jumping comes with it
Excitement peeing and jumping on guests often arrive together, because both are the same arousal with different outlets. Work on the greeting itself as well, rather than treating the puddle alone.
Most dogs grow out of this over months as they mature. We will not put a date on it for your dog, and the calm-arrival routine is what shortens it either way.
Today's version, in one line: greet your dog outside tonight, 2 minutes after you get in, crouched and quiet.