What CreatureTeacher said.
To stop a dog from peeing when it gets excited, figure out what's causing it to get excited, and make those times less exciting. The most common times for pee excitement are when you come home, and when you get ready to take the dog for a walk. When you come home, ignore the dog for 10 minutes without making eye contact. You should really be doing this for any dog, IMO. If she's peeing when she sees you grab the leash to go for a walk, grab the leash 20 minutes before going out, and put it on her, 10 minutes before going anywhere.
The submissive peeing, when it's in trouble, is to show you that it's not a threat. ie, "Look, I'm not a threat to you, don't get mad, see I'm peeing just like a little puppy would do." Basically, you just have to curb the scolding and try and make yourself seem less threatening. Don't stand over the dog, looking down on it. I fostered a cocker spaniel mix that had that same problem. It tests your patience for sure. Find ways to correct her bad behaviors using only positive reinforcements.