Our inconsistency perpetuates the problem. Some of the time we tolerate the jumping and ignore it. Other times we reward the behavior by exchanging enthusiastic greetings. But when we're dressed up and the puppy's paws are muddy, it's a different story. Reprimanding the puppy for jumping up usually does not work. Either the puppy misunderstands the reprimand as praise or he gets even more excited and the jumping gets worse. If the reprimand is severe enough, the puppy may stop jumping at that moment but it doesn't solve the problem altogether; and it certainly is not a very nice thing to do. It's very similar to a person approaching you with a big smile, arm extended to exchange a hand-shake and you bopping the person in the nose. Even if your puppy learns that jumping up on you is not a good idea, he will usually get away with jumping up on everyone else.
An anxious or playful pup may leap high quickly and suddenly “poke” at your face with their nose. That can be triggered by leaning over the top of them especially when they’re in a high-arousal situation like a homecoming or around other dogs. It may be a way for stressed pups to relieve their anxiety, so be aware of situations that cause these behaviors. Dogs control each others' movement with their body language. Think how a Border Collie makes sheep move just by getting close. You can stop your pup’s jumps by stepping close to him just before he leaps. Cross your arms and step into the pup’s personal space before he crouches to leap.
For pups that ambush you and bite your rear end while playing outside, hide a toy or two in the backyard and ask them to find the toy. Bad weather can give puppies cabin fever when they don’t have adequate time outside to run off the energy. Mental stimulation can wear them out, too. Show your puppy a favorite toy and then roll it up inside an old towel and knot it to make a puzzle. Encourage the pup to unravel and get the toy. You can even tie the first toy-in-the-towel inside a second one for more of a challenge to relieve boredom.
When he gives up and stands still (staring at you like you’ve gone crazy), THAT’s when you greet your dog and give him some love and attention. This is the reward he was looking for. Following these rules will ensure he learns that he will only earn that reward by not jumping (don’t overdo the high-pitched voice saying, “GOOD BOYYYYY” or it will just rile your dog up even more to start jumping again).
Determining if this is your dog is a little more complicated, but it is often seen when your dog isn’t very excited (or that there isn’t much of a reason to be excited). This is more than likely to happen when you are in their way or have something that they want. They will usually jump on you and try to push you back more than just jumping up to give you kisses. Often times they will jump on you and try to hold on when you push them away or try to move into them. Sometimes moving into them may elicit a growl because they want to back you off. 
By playing some simple games like fetch with your dog, you can kill 2 birds with one stone. First is that the actual playing of the game will surely tire them out so much that they won’t have the energy to jump the fence. Second is that you are associating the fun of the game with the yard. If they have fond memories of the yard they will be less likely to try and get out.
Nobody likes to have a handful of groceries knocked out of their hand or get muddy paw prints on their new pants as they walk through their own front door, let alone someone else's front door. Jumping up can be a cute greeting when you have a small puppy or dog at home, but as time goes on, it can become quite annoying to you and your guests. Teaching your dog to calmly greet you and your guests, without jumping, will create a much more enjoyable environment to enter into after a long day at work or when receiving guests at home.
I remember going to a dog park where a little 4-month-old Boxer puppy ran around jumping on everyone. The dog was not heavy enough to knock most of the adults down. However, it left everyone with muddy pants and the dog was big enough to knock over small children. The owner did nothing to stop the jumping puppy. After all, it was just a small pup. Everyone around her was pretty annoyed at the muddy prints the dog was leaving all over their clothes. That is an owner who will have a problem with her dog jumping on people when it gets older.
×