The McDonald's (MCD 0.12%) miracle seems to have run its course. Although the burger chain beat analyst expectations for earnings in the fourth quarter, a lack of customer traffic continues to dog the restaurant operator, which came up short once again on guest counts. After a year and a half of rising same-store sales, the company saw its comps turn negative in the fourth quarter, as the allure of all-day breakfast failed to be the draw it had been.

In fact, it's clear that the gains at McDonald's have been largely ephemeral. Despite mostly higher comparable sales, the burger behemoth posted its fourth straight year of seeing fewer customers eating at its restaurants.

steak, egg, and cheese biscuit from McDonald's breakfast menu

Image source: McDonald's.

Getting them to return again and again

Same-store sales have several components. Although they're usually used as an indicator of organic growth because they tend to strip out revenue gains achieved simply from opening new stores, they're also influenced by pricing and product mix. A company may record higher sales even though it has fewer customers, so long as those customers are paying higher prices or buying more expensive products. That's pretty much the situation at McDonald's: Comps rose despite lower guest counts quarter after quarter because it had raised prices and offered a favorable product mix.

While the Golden Arches did notch two quarters of higher guest counts at the start of 2016, they turned south in the third quarter and apparently fell off the table in the fourth, as McDonald's ended the year with guest counts down 2.1%.

This is even more worrisome when you consider just how many campaigns McDonald's ran last year to boost customer traffic. From the McPick 2 promotion (which it quickly changed) and a new customer loyalty program to an early launch of its popular Monopoly promotion and even the introduction of table service, the burger joint was continuously rolling out new ideas to bring more customers in -- few of which made any lasting impression.

No seat at the table

Of course, it's not all the company's fault. Part of the problem is the declining health of the restaurant industry itself. According to the MillerPulse index, which tracks industry comps and traffic, the industry notched another disappointing year, and December's performance was its worst in six years.

Family at McDonald's with Happy Meal

Image source: McDonald's.

Restaurant industry same-store sales fell 2.4% in December, with casual-dining chains suffering a 4% drop and quick-serve restaurants like McDonald's falling 0.8%. And similar to the burger chain, customer traffic was the problem. Guest counts fell 4.1% industrywide for the month, its worst outing since the index first started tracking the numbers in 2010. While the casual-dining segment bore the brunt of the decline with a 5.3% drop-off, fast food was down 2.9%, too.

It doesn't look as if 2017 is going to be any better. Commodity price deflation will continue to pressure restaurants, and despite lower beef prices that are helping burger chains lower costs, lower prices also enable grocery stores to lower their prices. Supermarkets have been a big factor in the underperformance of restaurants, in fact, as consumers find it's increasingly cheaper to eat at home than dine out.

We see that reality reflected in restaurant-level margin, where the company-operated margin at McDonald's rose to 17% in 2016 from 15.2% the year before, even as sales fell, as it benefited from price increases and falling commodity costs.

Focus on the menu

Yet as the value leader in the fast-food segment, there's something wrong as it's not capturing more dollars from cash-strapped consumers. As CEO Steve Easterbrook admitted on the earnings conference call with analysts, "The McPick menu does work well for customers ... but that alone isn't winning market share on the value end."

McDonald's mobile ordering app

Image source: McDonald's.

At least on one level, Easterbrook gets how to fix what's wrong with the restaurant, yet on other levels there still seems to be a disconnect. The CEO says the chain is focusing on "the experience of the future," which entails greater self-ordering through kiosks, as well as table service. While not having to stand in line to order has its appeal, the greater customization associated with kiosk ordering means service will, out of necessity, slow down. And I don't know of many people demanding wait staff at a fast-food joint.

Yet his attention to the menu is encouraging. The two new size options of the signature Big Mac, for example, ought to open up more opportunities for customers to sample the sandwich if they haven't tried it before, as some of the company's own internal research suggests only one in five millennials has tried the iconic sandwich. Like the all-day-breakfast promotion before it, it could be one of those pivotal changes that positions the chain for long-term growth.

Remembering the company's value position in the market -- and not running off on wild tangents in pursuit of being the "progressive, modern burger company" that Easterbrook has been all too fond of doing -- ought to keep the Golden Arches shining for years to come.