I agree with the advice given above.
I would add that the behavior may or may not have anything to do with your dog's background. Some dogs are just like this. The dog that I have presently, as well as the dog that my mother has presently, were both acquired as young puppies and were submissive urinators for a long time (well over a year for both of them -- maybe closer to two years), and neither one of them has ever been abused, intimidated, or mistreated.
Adopting a rescue dog is a great thing to do. It is a bit frustrating not to know what the animal has been through in the past, but you just have to start from where you are.
The Denver Dumb Friends/Humane Society has a great website with training tips. Here is a link to their page on Submissive Behavior, which helped me.
http://www.ddfl.org/behavior/submissive-uri.pdf
Look especially at what is said about your body posture. Don't approach the dog head-on, and don't look her in the eye. Those behaviors on your part will trigger more submissiveness from her.
Good luck.
Linda's advice is very sound. This dog doesn't need any added excitement in her life or yes, she will pee. Anyone coming home or visitors coming to her territory apparently raises her excitement levels to the ponit of urinating. The advice to ignore this behavior also applies to dogs who are fearful of thunder or other loud noises. The more of a big deal you make of it, the more the dog thinks it really IS a big deal, so the unwanted behavior gets reinforced.
How do you currently react when you walk in and she seems scared and urinates?
Obedience training is great, and I'm so glad to hear you're doing that with your dog - so many people don't bother. In your case though, this is a psychological problem that obedience training won't fix. To build confidence, she needs more socialization, not less, or the occasional incidents will continue to happen. How does she do on walks? Is she interested in other people and dogs or does she cling to you and avoid them? Ever take her to a dog park? If so, how does she behave?
Sometimes having another dog helps a lot - depending on the other dog of course. A low energy, calm and stable personality rubs off on a low-confidence dog. If you choose that route, have a veterinary behaviorist evaluate the situation and help find the right dog for you both.
My sister adopted a dog from a shelter who was just like your dog. My sister intimidated her so much the poor thing peed every time my sister even looked at her. Of course, Sis thought it was all the dog's fault. Wrong. We babysat Shadow for a week and never once did she pee. Not once. Both our dogs took her under their wings (paws?!) and showed her the ropes. They taught her how to run through the dog door, when to bark at the front window, how to chase squirrells - all kinds of things. In other words, she learned dog skills from our dogs. I was so disappointed when my sister rehomed Shadow. Sis was unwilling to change, but obviously Shadow could, and did, in the right circumstances.
There is a forum here at Med Help for pet behavior problems that is moderated by veterinarians. Your question would be a great one for that forum. Scroll down this page and look for the link on the right side labeled "Pet Behavior Problems" to access the forum. And please let us know how she does. You get a high 5 from me for trying to do everything possible to help your dog. :-)
They had an episode on Cesar Millan, Dog Whisperer, about a dog that peed whenever someone came home or cameover to visit. He told the owner/visitor to ignore the dog completely when they came in the door, not to look at him or talk to him, to just go on about their business. After the dog got used to them being there, and was calm, then acknowledge him and pet him.