The main reason investors are attracted to Shake Shack (SHAK -0.90%) is its potential for dramatically higher sales from expanding its store base outside of the New York area. The "better burger" chain is growing its global footprint at a 30% annual rate, and that pace isn't hard to maintain given that it only operates 218 locations today.

Sure, the company isn't going to approach anything near the 36,000 restaurants that McDonald's (MCD 2.20%) manages. But a doubling of its locations is possible over just the next few years.

Meanwhile, Shake Shack has an attractive metric it's holding over the fast-food titan right now. In its second-quarter earnings report, the chain announced that customer traffic is still rising, while Mickey D's comparable metric has been stuck in negative territory for over a year.

A man about to bite into a burger.

Image source: Getty Images.

Getting more diners

Shake Shack's traffic improved by 1.3% in the fiscal second quarter to mark its third consecutive quarter of growth. That uptick combined with higher menu prices to send comparable-store sales higher by 3.6%, or about even with last quarter's strong results.

McDonald's is posting better overall growth and seeing positive momentum, too. Comps accelerated to a 5.7% increase last quarter from 4.5% in the prior quarter and 2% during the second half of 2018. However, the fast-food chain credits higher prices and a shift toward more expensive menu items for all of those gains. Customer traffic is trending lower in the U.S. so far in 2019, even after declining 2.2% last year.

The digital battleground

Shake Shack got help from popular new food releases like Chick'n Bites, but the bigger contributor appears to be its online ordering and delivery offerings. Fast-food fans are flocking to that sales channel so quickly that management announced a partnership with Grubhub to make the service more widely available.

In a conference call with investors, CEO Randy Garutti also said that executives are designing new store locations with the digital sales channel in mind. "These are busy restaurants and the addition of multiple ordering channels can sometimes create ... confusion in the front of the house," Garutti explained. That's a "key consideration in our thinking for design in new Shacks and how we continue to evolve in existing Shacks," he said.

McDonald's has been thinking about these problems for well over a year, and rolling out digital ordering and delivery capabilities is a focus of its $1.6 billion store remodeling plan for 2019. Its far larger network has made it hard to roll out the changes, but the chain's record spending pace appears to be lifting the U.S. market closer to the expansion rate in booming international areas like France and Australia.

Given that track record, I'd expect McDonald's to catch up to Shake Shack and others over the next few quarters so that investors start seeing meaningful contributions from home delivery. That offering is already lifting customer traffic in the chain's outside markets, and it's only a matter of time before fast-food fans start using the service routinely here in the U.S.

In a way, McDonald's is getting an assist from early movers like Shake Shack and Chipotle, which doubled its digital sales last quarter. These chains are broadening the niche by putting home delivery in consumers' minds. That can only help McDonald's as it works to return to customer traffic growth in the second half of 2019.