we used to have a conventional fence for pet containment. It went deep enough that it wouldn't be easy for our dog to dig under, and it was high enough that she could not jump over it. We figured that this was the best way to make sure our dog didn't get away and run out in traffic. We live by a busy interstate road, so the chance of her getting hit by a car was very real. Unfortunately, one day my wife left the gate open for a few minutes while she was unloading the car. That was just enough time for the dog to get out, run into the road, and get hit. Fortunately, she escaped with nothing worse than a broken leg, but it was definitely a painful lesson for all of us.
We decided to try something different. We upgraded to an electric dog fence. In the past, we have been against getting an invisible fence for dogs because we didn't think it was quite humane enough. There are different electric dog fences out there, basically they all involve giving the dog some sort of unpleasant signal to show that she has strayed too far. The particular electronic fence we got would admit a high pitch, painful beep in her ear. Although I felt bad about having to do this to my dog, it beat the alternative. Hurting her ears with an electronic dog fence was certainly better than letting her get hit by a car again.
The most common mistake people make with an electric dog fence collar is to depend on it too much before the dog has been completely trained. A lot of people assume that a pet containment system well stop a dog instantly from going outside the boundaries. This isn't really the case. An electric dog fence annoys or hurts the dog, but the dog might not realize immediately that she is being hurt for going past the barrier. She might believe that something else is causing a loud beeping in her ears , and continue to run out in front of traffic. Invisible fence training requires careful supervision until your dog gets it. Up until that point, she can still get into trouble.
Fortunately for us, we had a conventional fence. We simply put the electric dog fence about a foot inside the conventional fence so that, whenever she got near to it, she would hear the painful beeping. If you don't have the luxury of using a normal fences as a training aid, you can simply use a long leash. Leave the dog tied up so that she has the ability to go just outside the electric dog fence. That way, she can get far enough to hear the annoying beeping, but not far enough to get into traffic.