In order to perfect the proper greeting routine, your dog needs much more practice than that. You can speed up the training process by leaving through the back door and returning through the front door over and over again. When your friends come over, have them do the same. Each time, ask your dog to sit-stay before opening the door. At first his excitement will make it difficult for him to concentrate but after you've repeated this process 10 times, he will calm down and be able to concentrate. Before asking your dog to sit-stay in this distracting and exciting situation, be sure he has a reliable sit-stay in normal, non-stressful situations. And of course you can always just hold the dog in a sit if need be.
If you have ever seen two dogs when they meet, they greet each other face to face, unless there is a massive size disparity. So, why are we surprised when that is how a dog wants to greet us? You come home from work and let your dog out, and they are excited to see you and excited to show you how much they have missed you. So they jump up on you to get closer and give you some love.
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.
When a dog jumps on a human of its own free will, it is not "greeting" the human, it is asserting its dominance over the human; it is the dog communicating that it is alpha and/or wishes to own/control the human. A subordinate would never dream of running over and jumping on the alpha dog of the pack. Space is respect and lower members of the pack respect the higher members. If your dog jumps on humans, it does not respect them. Note: when a young puppy jumps on humans it is sometimes its attempt to reach one's face. Puppies need to be taught not to jump up on humans as this behavior will manifest into other meanings as the puppy grows up into an adult dog.