This behavior has an actual name - Coprophagia, and it is quite common in puppies.
Sometimes it is due to a nutritional deficiency ... but not always. Dogs will eat the feces of many other species .. kitties for example leave yummy treats in the litter box, bunnies leave doggy M&M's outside .. if it tasted bad the behaviour would self correct!
Some people have had success in stopping this behavior by supplementing their dog's diet with one spoonful of canned pineapple or a teaspoon of spinach or a dash of MSG. (I'm not loving the MSG idea)
Best way to avoid it is to keep the yard clean and keep your dog away from feces all together.