Foodies want to know everything about their animal-based dishes these days — where the meat came from, what it ate, what its name was. OK, maybe not that last part. But there is a big difference between industrial cattle farms and grass-fed meat — both in price and in nutritional considerations.

We’ve already seen how chemistry can help monitor the source of your meals, ensuring that you don’t eat endangered species. Now you can tell what your beef ate before it reached your plate.

A group of chemists from Ireland figured out a way to reconstruct the diet of cattle, determining whether they spent their days munching fresh pasture grasses rather than barley or silage. Frank J. Monahan and colleagues studied the proportions of stable isotopes of oxygen, nitrogen, hydrogen and sulfur found in the muscle tissue and tail hair of Irish beef cattle. They were able to determine what the animals primarily ate, and in some cases, could even figure out where the animals came from.

Certain diets yielded a distinctive signature, the researchers report in the Journal of Agricultural and Food Chemistry. They couldn’t tell between animals that ate from a pasture and those that ate grass silage, but there were clear differences between animals that ate pasture grass and those that ate concentrated food products. Using hair and tail samples, they could even follow changes in an animal’s diet over the course of its lifetime. The researchers could tell whether a steer had switched from a grass diet to a corn-based diet near the end of its life, for instance.

Monitoring animals’ tail hair yielded such precise information about diet that it could be used to monitor farms’ production practices, the authors say.

Stable isotope ratios have also been used to determine the source of bottled drinks, and figure out where people have been based on chemicals left behind in their hair.

Speaking of soft drinks, chemists also announced this week that they’re using protein analysis to test for kola nuts, a pricey ingredient found in natural cola drinks. Drinks containing the kola nut had the signature of plant proteins, while Coca Cola — which does not claim to use the kola nut — did not.

Testing methods like these could give consumers assurances that they really are getting what they pay for.