We had an American Eskimo puppy. Each time my brother came home the puppy would get wound up and pee on the carpet. This had to stop. We decided to take the dog out an hour before he came home. It did not work so it was decided to make it a half an hour before he came in. It was decided to use the crate method. We had a winner.
My friend Kathy had a poodle that had a different problem with potty training. The dog went where ever it wanted to go. They used an empty little kiddie pool to contain the poodle when they were not watching. It worked very well at first. The dog could not get out of the kiddie pool but soon learned how to pull the stem of the pool out to deflate it. They had to keep him in the bathroom where there was no carpeting.
For many years there has been different methods used to potty train your dog. Some of these methods are very good while others not. Yelling at a dog after he has done the deed and moved on is not a recomended method. The dog does not make the connection between being yelled at and the accident. If you catch them going potty you can clap your hands and say no. This will usually stop them from going. Then move them to the spot you want them to use and praise when they use it.
Hitting your dog is never recommended. This can create fear and neverousness in your dog. The dog may not trust or come to you.
Sometimes many years ago the dog owner would do an adversion therapy to stop the dog from soiling the house. They would stick their nose in the mess. It was suppose to prevent them from going potty there again. It will not work because the dog does not understand.
The use of pateince and kindness will go a long way to potty training your dog.