McDonald's needs to win over budget shoppers to attract more customers, with the chain recently adding new local deals to its $1 $2 $3 Menu and inexpensive breakfast options like Donut Sticks.

Still, the top reason that people who are eating at McDonald's less frequently provided to explain their behavior in a new UBS survey is that they had less spending money.

McDonald's is simultaneously trying to win over more affluent shoppers through its newly national delivery service.

Visit Business Insider's homepage for more stories.

McDonald's is determined to win over budget shoppers.

The fast-food giant has reported nine consecutive quarters of same-store sales growth, even as the chain battles slumping traffic.

Now, McDonald's is looking to both budget shoppers and wealthier customers to reverse the trend and boost traffic, according to a UBS research report released on Tuesday.

"MCD remains focused on driving positive guest counts, by retaining customers, regaining lost transactions, and converting casual customers," reads the report from UBS' Dennis Geiger.

Of the more than 2,000 fast-food eaters surveyed by UBS, the top two reasons customers who said they are eating at McDonald's more frequently provided to explain their behavior was "good value" and "more promotions." When asked what factors would make them visit more frequently, the top three answers were "lower prices," "higher-quality food," and " more frequent promotions."

McDonald's has targeted these value-seeking customers with deals such as $1 $2 $3 Menu, which has been tweaked to focus more on local offers, and inexpensive breakfast options such as Donut Sticks. Geiger writes that further breakfast plans in 2019 include local value offerings and new menu items.

"Despite a pullback on some of the deeper QSR value offerings, intense industry competition on value still remains and likely will not notably abate in the near term," Geiger writes.

It is crucial that McDonald's provide the deals that customers are seeking. More than one in four respondents who said they were eating McDonald's less explained their behavior by saying that they had less spending money, meaning that a lack of disposable income was the top reason that customers said they were ditching the chain.

Recently, declining unemployment and increases in consumer optimism have painted a cheery picture of the American economy. However, many people who regularly eat at fast-food chains continue to struggle financially.

The bottom 40% of American consumers had less discretionary income in 2017 than they did a decade prior, according to a recent study by Deloitte. The next 40% didn't do much better, with only the top 20% seeing meaningful income gains.

Read more: Millennials' habits are threatening countless industries — but a new report says it's only because they're poorer than their parents

While McDonald's depends on budget shoppers, it also wants to win over this top 20%. Attracting more affluent customers means higher checks, allowing McDonald's to fund more expensive projects that can boost the chain's reputation, such as with its 2018 fresh beef rollout.

Delivery has proven to be one crucial way to win over higher-income customers. McDonald's recently rolled out its first national advertising campaign to promote its delivery service with Uber Eats.

The average check size of McDonald's delivery orders is twice as large as traditional orders, according to UBS. Customers in households earning more than $100,000 are ordering delivery more frequently than lower-income customers. These more affluent customers are also significantly more likely than people in households making less than $100,000 annually to say they plan to visit McDonald's in the next year.

UBS summed up the report by raising its McDonald's price target to $203 from $185, due in part to the company's comparable sales momentum.