With your dog sitting at your side, set off and give the command “heel” (so that your dog is aware you are about to move). If the dog gets ahead, stop and encourage it back to your side with a titbit. Repeat. To begin with, stop every three to four paces to praise your dog and give a titbit. Do not use your voice unless your dog is at your side. You can also practise this off-lead in a secure area – this makes you work really hard at keeping your dog with you, rather than relying on the lead.
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.
Success is usually attained in small steps. Training sessions with your dog should last 10 to 15 minutes, two to three times per day. This is especially true for puppies because of their very short attention spans. Longer sessions can cause an adult dog to become bored. Start by teaching basic commands. Try to stick with one action per training session so your dog does not get confused.
One of the easiest ways to prevent accidents is learning to recognize when your puppy needs to go out. Most puppies will sniff the ground when they’re getting ready to potty, but there are many other more signals that happen prior to sniffing. Puppies that pace, seem distracted and walk away from play are subtly signaling that they have to go out. If your puppy tries to sneak out of the room, take a potty break right away.
Many owners appear disappointed that their young puppy will not toilet when out on a walk, yet relieves itself the second it gets back home. This is because the puppy has been taught to toilet only at home (hopefully in its garden), and being creatures of habit, they often wait until they have returned home before evacuating their bladder and/ or bowels.