When people shopped for their groceries online, they spent less money on unhealthy food like candy and frozen desserts compared to when they shopped in stores.
CNN  — 

Eating healthier may be as simple as not going to the grocery store, one study revealed.

Participants who ordered their groceries online spent less money on junk food compared to when they shopped in person, according to a study published Tuesday in the Journal of Nutrition Education and Behavior.

Researchers tracked the spending patterns of 137 shoppers over the course of 44 weeks either from 2015 to 2016 or from 2016 to 2017. People who shopped online spent on average about $2.50 less on unhealthy food purchases like candy and frozen desserts compared to when they did their shopping inside stores, said lead study author Laura Zatz, a senior adviser at The Behavioural Insights Team.

While the study did not examine why shoppers spent less money on unhealthy food when they shopped online, Zatz said there are some likely reasons, such as a reduction in opportunities for impulse purchases.

“Online shopping allows shoppers to avoid abundant in-store marketing and enticing food stimuli, which encourages us to add items to our basket that we didn’t plan to purchase,” she said.

Those towers of junk food at the end of grocery store aisles don’t exist online, and other foods may be hidden from view as well, Zatz added.

Subscribe to CNN’s Fitness, But Better newsletter: Get back in the groove. Sign up for our newsletter series to ease into a healthy routine, backed by experts

Many people have presaved grocery lists, or they filter food options based on their dietary needs like low sodium, she said.

Who we shop with may also play a role in our spending purchases, said Stephanie Rogus, assistant professor of human nutrition and dietetic science at New Mexico State University, who was not involved in the study.

When shopping in person, adults often bring along their children or other family members, who may ask for unhealthy candy and snacks, she said.

Online grocery shopping is still relatively new, and Zatz said that marketing will evolve and influence shoppers to purchase unhealthy food online.

Grocery stores may begin to advertise foods that aren’t selling as well in the form of pop-up ads or personalized recommendations “to overcome reduced spending on certain items,” she said. If unhealthy foods are underselling, shoppers might start seeing ads for them.

Shoppers spent 44% more per transaction and purchased more items online versus in stores, researchers also found.

Transaction fees could have influenced this trend, Rogus said. Many online grocery services have a transaction fee, so combining shopping trips to have less transactions could have saved the participants some money, she said. At some stores, spending a certain amount could mean the fee is waived altogether.

The majority of food shopping was still done in person during the study’s time period, with participants shopping online just under 29% of the time.

There is potential for online grocery shopping to reduce unhealthy food purchases, Rogus said, but the high percentage of times participants opted to shop at a brick-and-mortar store means the full impact is unclear. Lower-income groups also face additional obstacles with online shopping that could detract them from using the services, she said.

“Barriers including limited internet access, minimum purchase requirements, and online ordering fees need to be addressed if online shopping is going to be encouraged by policymakers and researchers,” Rogus said.

Get CNN Health's weekly newsletter

Sign up here to get The Results Are In with Dr. Sanjay Gupta every Tuesday from the CNN Health team.

Additional research should be done on the online shopping patterns of people in lower-income communities, she added. Most of the shoppers in this study were higher-income and could potentially afford to spend more money to avoid transaction fees or hit a required minimum payment for online orders, Rogus said.

Online shopping can reduce the amount of money shoppers spend on unhealthy foods, but “Americans still need to make a conscious decision to plan ahead and purchase a healthful and varied mix of foods consistent with a healthy diet,” she stressed.