Coprophagy, or consuming feces, is common in domestic dogs. Dogs are scavengers, which means that anything can be considered food to a dog. Eating feces, although disgusting to us, is not disgusting to them, its food. They may simply be harvesting undigested food from the fecal material, whether it's their own or another animals. Coprophagy may be caused by a nutritional (thiamine or vitamin-B) or digestive enzyme deficiency in some dogs. This possibility should be discussed with your veterinarian.
Coprophagy may be a displacement or compulsive behavior in response to stress, frustration, or anxiety. A dog that is tied up in the back yard for many hours a day is lonely and frustrated. This often results in displacement behaviors such as barking, digging, and coprophagy. Coprophagy may also be an attention-seeking behavior, for example if the dog has learned that his/her owner comes flying out of the door in response, giving the dog that much needed attention (remember, even negative attention is attention to a dog).
It is even possible that coprophagy is a behavior the dog learned from its mother, since mom dogs consume the fecal material of their puppies. The puppies may learn to eat fecal material from watching her, or from the smell of it on her breath. If the puppy was raised in unsanitary conditions, the smell of feces may be associated with the smell of food since they may have often been side by side.
How do you stop coprophagy?
Switch to a high quality dog food to ensure your dog is getting proper nutrition.
Have your veterinarian test for nutritional deficiency.
Reduce the stress, frustration, or anxiety in your dog's life.
Remove your attention in response to the behavior.
Add meat tenderizer to your dog's meal to render his feces distasteful.
Booby-trap a few piles with Tabasco sauce or cayenne pepper.
Use remote punishment such as a squirt from a hose or blowing an air horn just as the dog begins to eat the feces. Pairing an aversive event with the act of eating the feces may stop the behavior.
Clean the feces from the yard as soon as your dog defecates.
Walk your dog in a leash so that you can control his/her movements.
Coprophagy is a very difficult behavior to extinguish. It may be the case that you will have to manage your dog's environment for the rest of his/her life to prevent the behavior.