How do you stop puppy eating his feces?

Everytime you feed your puppy, feed it a tidbit of pineapple either from the can or fresh. The puppy won't like the taste or smell of his feces. And thus won't eat it. I am trying this with my puppy as of today. I got the hint off of: It's me or the dog, television show.