Unfortunately, there is no magic length of time or milestone age when a puppy can be considered fully housetrained and there are many factors that go into how quickly a puppy can be potty trained. Your puppy’s age plays a major role during the initial phase of potty training, as a very young puppy won’t have the muscle control necessary to hold it for long periods of time.
If pup is peeing in the wrong place... you may be able to stop him. Move quickly towards him when he begins to pee and pick him up. Urgency is key here - you want to startle the pup just a little as you move towards them to pick them up, but you DO NOT want to scare the pup. You are redirecting your puppy to the right spot - not disciplining him. Immediately after picking him up, take him to the potty area and patiently wait. Most pups will finish there. Reward your pup with exuberance!
Here’s one thing we’ve found that works really well, especially for people who will be taking their dog with them over to others peoples house and don’t want to be embarrassed when Fido eliminates on the carpet. Get a bell and attach it to a rope or something so it can be hung around the doorknob. Then through the shaping process teach your dog when he bumps the bell with his nose he goes outside.
It's not so much the dog doesn't listen, more that he doesn't understand what you want him to do. Go back to basics and don't punish him when he toilets indoors. Double your vigilance and take every opportunity to put him outside to toilet. The crucial thing is to be present when he does toilet in the correct place, so that you can reward him. This makes him keener to repeat the performance to get another treat. Conversely, if you have been telling him off for indoor accidents he may already feel inhibited about going to the toilet in your presence, including when he goes outdoors. This is one reason why it's important not to punish for inappropriate toileting.
If your dog isn’t giving you an obvious signal that they need to go out (like whining at the door) I suggest teaching them to ring a bell when they need to go outside. Some of the other signs dogs give that they need to go out such as pacing around or circling can be easy to miss if they’re in another room, which is why a noise based signal such as ringing a bell can make things easier.
I know I keep mentioning this, but it is SO IMPORTANT for you to understand that in the dog potty training process, there are going to be accidents. What you do when your dog has an accident is very important. Yes I know that nobody likes cleaning up after the fact but if you react negatively your dog will start to associate your anger or frustration with him going to the bathroom and will be afraid to eliminate around you. I would say this is the biggest mistake people make while dog potty training.
It’s an instinct for your dog to want to investigate things you put near his muzzle, so he is likely to touch the bell lightly with his nose. Be ready for that moment and click and treat. If he is apprehensive, put the treat very near the ribbon of bells so that he almost HAS to touch them in order to get at his treat. When he touches, click and treat!
Strictly following the model set out in the Koehler Method of Dog Training, some 50 years later, the Koehler method continues to be taught in both class and private training formats. The method is based in the philosophy that a dog acts on its right to choose its actions. Koehler explained that a dog's learned behavior is an act of choice based on its own learning experience. When those choices are influenced by the expectation of reward, the behavior will most likely be repeated, and when those choices are influenced by the anticipation of punishment, they will most likely cease. Once the dog has learned that its choices result in comfort or discomfort it can be taught to make the correct decisions. Action→Memory→Desire encapsulates the learning pattern used by the method; the dog acts, remembers the consequences, and forms the desire to repeat or avoid those consequences. Adherents believe that once the behavior has been correctly taught, it should be performed, thus making any correction, fair, reasonable, and expected. While the model has been used consistently since 1962, some of the punishment procedures described in the book are now not considered necessary, humane, or appropriate by many trainers.
Be persistent! Make sure the puppy doesn't get the opportunity to pee and poop by using a leash indoors or confining him to a crate when you're out. Depending on the puppies age, pop him outside every 20 - 30 minutes, so there's a greater chance of him toileting outside (by accident at first.) In addition, get rid of any scent markers he's left by peeing or pooping indoors, as these will draw him back to the same spot. This means cleaning the area daily, for 2- 3 weeks after he last pooped there to fully get rid of any lingering odor that the dog can detect.
There also behavioral issues that can interfere with successful training. Urine marking is a normal dog behavior in which the animal will hike their leg and mark a certain area or object. With separation anxiety, the puppy may have accidents inside when you leave them at home alone. Some puppies become nervous or upset when their owners are away. Other puppies have a submissive or excitement urination problem. This causes them to spontaneously urinate during certain activities. Discuss these possibilities with your veterinarian or trainer if you're not getting positive results.
In considering the natural behaviours of specific breeds of dogs, it is possible to train them to perform specialised, highly useful, tasks. For example, Labrador retrievers are the favoured breed for the detection of explosives. This is because of a combination of factors including their food drive which enables them to keep focused on a task despite noise and other distractions. Most working breeds of dogs are able to be trained to find people with their sense of smell (as opposed to their sense of sight). Cocker Spaniels are able to be trained as part of a termite detection team. Their relatively small size enables them to fit into small spaces, and their light weight allows them to walk on areas of ceiling which would be dangerous to anything heavier. In fact, although unusual, termite detection dogs are much more reliable at detecting termites than humans who rely on a basic system of tapping and listening. Because of their ability to learn signals by sight and for their energetic and athletic natures, German Shepherds are able to be trained for work alongside search and rescue teams and human apprehension teams.
Pups between the ages of 9–12 weeks who were permitted to observe their narcotics-detecting mothers at work generally proved more capable at learning the same skills at six months of age than control puppies the same age who were not previously allowed to watch their mothers working. A 2001 study recorded the behaviour of dogs in detour tests, in which a favorite toy or food was placed behind a V-shaped fence. The demonstration of the detour by humans significantly improved the dogs' performance in the trials. The experiments showed that dogs are able to rely on information provided by human action when confronted with a new task. Significantly, they did not copy the exact path of the human demonstrator, but adopted the detour behavior shown by humans to reach their goal. A 1977 experiment by Adler and Adler found that puppies who watched other puppies learn to pull a food cart into their cages by an attached ribbon proved considerably faster at the task when later given the opportunity themselves. At 38 days of age, the demonstrator puppies took an average of 697 seconds to succeed, while the observers succeeded in an average of 9 seconds.
Millan's first job in the United States was at a dog grooming store. He later created the Pacific Point Canine Academy. Jada Pinkett Smith became one of Millan's first clients and supporters when he was working as a limousine driver, providing him with an English tutor for a year. Subsequently, Millan created the Dog Psychology Center, a two-acre (0.81 ha) facility in South Los Angeles, specializing in working with large breed dogs.
If you want to prevent accidents before they happen you’re going to need to watch your pup at all times, including every time they wander off. It only takes one accident to set your training back. Now I know that watching your puppy non-stop isn’t exactly fun & exciting, but being able to catch them before they have an accident is why this method works so well.
Lindsay says of this study, "Schilder and Van der Borg (2004) have published a report of disturbing findings regarding the short-term and long- term effects of shock used in the context of working dogs that is destined to become a source of significant controversy ... The absence of reduced drive or behavioral suppression with respect to critical activities associated with shock (e.g., bite work) makes one skeptical about the lasting adverse effects the authors claim to document. Although they offer no substantive evidence of trauma or harm to dogs, they provide loads of speculation, anecdotes, insinuations of gender and educational inadequacies, and derogatory comments regarding the motivation and competence of IPO trainers in its place." 
When you are home but can't attend to your puppy, follow the same procedures described above. However, the more time you spend with your puppy, the quicker he will be house trained. Your objective is to take your puppy to his toilet area every time he needs to eliminate. This should be about once every 30-45 minutes; just upon waking; just after eating or drinking; and just after a play session. Provide house training taxi service to avoid unnecessary "mistakes".