Now you can say McDonald's (NYSE:MCD) is on the road to recovery. Everything before this was merely feints and false starts, no matter how far its stock had climbed. Having finally achieved this milestone, the burger baron is at last truly back on track.

So what happened? For the first time in five years, McDonald's posted a year-over-year jump in annual customer traffic numbers, a 1.9% bump. While the restaurant operator has posted comparable sales growth, 2017 was the first year since 2012 that guest counts were positive, meaning it's gaining customers once more. 

McDonald's quarterly comparable sales and YTD guest traffic chart showing improvement

YTD = year-to-date. Data source: MCDonald's quarterly SEC filings. Chart by author.

Flights of fancy

CEO Steve Easterbrook previously estimated that the restaurant operator had lost a half-billion customer transactions to competitors. Part of that was borne of the desire to eat "healthier," and the rise of fast-casual chains like Shake Shack and In-and-Out Burger gave diners higher-quality meals and fresher ingredients. But it also gave them a higher tab.

Unfortunately, McDonald's chased after that crowd, believing it could compete with these upscale burger shops. It introduced kale bowls, lobster rolls, and pricey sirloin burgers in pursuit of Easterbrook's vision of creating a "modern, progressive burger company." In the process, it forgot its core customer, the vast majority of whom come to the burger joint looking for a tasty meal at a good value.

It's no coincidence that the company's change of fortune for the better began when it once again started focusing on the value end of its menu. Although Wendy's (NASDAQ: WEN) was first out of the gate with its 4-for-$4 bundle meal, a successful promotion that it has continued to expand to great effect, McDonald's McPick 2 program may be the better choice because of the broad selection it gives customers. It is often singled out as a prime reason for the comparable sales growth the chain has enjoyed, including in the fourth quarter, when the bundled offering was credited for the bulk of the 4.5% comps increase.

McDonald's has continued its deep dive into the value end with its $1-$2-$3 Dollar Menu that further gives customers a variety of options for a very low price. A certain amount of credit must also be given to the all-day breakfast menu that customers had wanted for years. Its introduction in 2015 put an immediate halt to the company's slide, and though the outsize impact it created in reversing its downward trend has faded, it remains a popular addition.

Two people eating McDonald's food.

Image source: McDonald's.

A better experience

Yet it wasn't only revitalizing its value menu that helped revive the burger shop's fortunes. At great expense and difficulty, McDonald's has improved its food. From launching a cage-free-egg initiative to ensuring that the beef it uses is free from antibiotics, McDonald's has often been at the forefront of a food-industry phenomenon that takes into consideration animal welfare and its ultimate effect on its customers.

We're seeing this effort further creep into various menu selections, such as the use of fresh beef in several items. Last year McDonald's committed to go national with a fresh beef Quarter Pounder burger, an initiative that required two years of planning. The nationwide rollout should be complete by the middle of the year. And it's extended it to the new Archburger that it's testing in select markets. It's a smaller burger than usual -- one-sixth of a pound -- but it will retail for $2 or so, putting it in the middle of its new dollar menu offerings.

All of this is finally getting customers to come back to McDonald's. Guest counts at the restaurant ended 2017 some 2% higher than the year before, a not insignificant amount. It's perhaps ironic that having finally achieved that milestone, McDonald's stock has fallen 4% since that report, as of this writing.

Regardless, the business is now truly firing on all cylinders. It has the right products, it's offering the right prices, and it's clearly in tune with its customers' wants. There have been signs all along that McDonald's was returning to health. This shows that the burger joint is back in a big way.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.