I've seen other dogs do this at dog parks and at dog events. Basically anywhere there would be multiple dogs or the scents of them. It's instinctual, so not sure there's any way to stop it, other than desensitization to other dogs. I'm sure you've already tried distraction. It can be hard to trump instinct!
Pee marking is so much more subtle. Maybe she's just leaving exclamation points after her name and phone number.