One of the issues our family has been struggling with for a long time is peeing issues with our son. He's old enough by now to understand the basics that most boys his age know such as you pee in private and in a toliet (or if your in the wild in the bushes) however, it is only until recently that I found out why he kept doing this. What it all boiled down to was CONTROL.
My husband and I have gone nuts but it took me sitting down with my son creating a senerio with his toys about peeing everywhere to understand that it had to do with the fact that my son was doing this because he was mad that someone told him no. There have also been the situations that he has not liked the noise/look/smell of the bathroom.
I don't have a permanent solution and I can't say what we did with our son is the first or best approach you should use. I just happened to use my son's favorite topic (earth science). Seeing my son pees a lot in the house I told him that like with most liquid it spreads as he's seen water spill from the table move into a large puddle of water on our floor. I talked about how liquid assorbs into the wood and walls and floor and weakens it. Then I was terribly mean and told him if he kept doing it when an earthquake comes the walls he's weakened will fall down first.
I felt horrible but I had to get him to QUIT peeing and find other ways to gain control so now that the peeing has stopped (we've gone over 2 months!) we're working on other ways to deal with the issues hoping to give him more skills before he realizes that I lied so it's not an issue.