Here is a list of 3 strategies that can prevent your dog from barking. While any of these methods can prove to be fruitful, don't expect to have a silent pup overnight. The truth is that the more your dog has been holding on to his/her barking habit, the longer it will take for them to change.
Here's some tips to keep in mind while training. Always keep an upbeat and positive attitude. Don't yell or excite your dog as this could exacerbate the problem. Be consistent! If one day you are training them and the next day you don't care, your dog will not know how to behave.
1) Remove the stimuli
Is there a specific room your dog goes to to sit by the window? Close the blinds and close the door if you can. Or simply place your dog in a different room. At night there are certain rooms I have to close, otherwise my dog will be right at the window at 4 AM.
2) Keep your dog properly exercised
A tired dog is a less frantic dog. Sometimes all that barking comes from frustration of being bored and full of energy. Get in a routine of taking your dog on adequately distanced walks depending on their size. It's great exercise for them and you!
3) Ignore the barking
Ignore your dog's bark until they have finally stopped. You will only be reward him/her after their good behavior. Don't talk to them, or even look at them. Rewarding your dog with attention when they are being noisy will only make them continue with their malfeasance.
Did any of these tricks help keep your dog from barking? Let us know in the comments below!