Peeing due to excitement! When a dog is peeing due to excitement, it is just that excitement and losing control.
This seems to be much more common in puppies and young dogs than in adult dogs but it can happen with adults too.
The best way to help your dog through this problem is to remain CALM during greetings.