Submissive urination is a normal way for your puppy to demonstrate submissive behavior. Even a dog that is otherwise housetrained may leave dribbles and puddles of urine at your feet when greeting you. Excitement urination with a puppy is usually caused by lack of bladder control. The puppy is not aware that he is urinating; he's just excited and any punishment will only confuse him.
It also helps to teach your puppy a “potty phrase” when you take him outside for a bathroom break. A potty phrase is a way to gently remind your puppy what he needs to do when he’s outside. It’s a big help during the potty training phase of puppyhood and you can continue to use for the rest of his life. Pick a phrase like “hurry up” or “go ahead” and say it softly right as your puppy eliminates. In time your dog will associate the phrase with the act of elimination, so you can say it when your puppy gets distracted and forgets what he needs to do outside.
The process is the exactly same for older dogs as it is for puppies; prevent accidents from happening by using baby gates and a crate if possible, create a predictable schedule, learn to recognize your dog’s potty signals, accompany your dog outside and immediately reward for all outdoor elimination, properly clean any accidents and supervise your dog until you’re sure that he understands the rules.