McDonald's (NYSE:MCD) is back on top of the fast-food industry. The burger chain just wrapped up its best year since 2012, as customers came streaming back into its restaurants.

Those gains happened in a flat dining-out market, too, so the chain snatched market share from established rivals such as Starbucks (NASDAQ:SBUX) and from newer challengers such as Shake Shack (NYSE:SHAK).

Mickey D's executives held a conference call with investors to add context to those operating wins while laying out their plan to keep the positive momentum going. Here are a few highlights from that chat.

Five friends sharing a fast food meal.

Image source: Getty Images.

1. Hitting the target

"Our top priority in 2017 was serving more customers more often, and we did. We grew guest counts by 1.5% in the fourth quarter and 1.9% for the full year, with all business segments positive."
-- CEO Steve Easterbrook

Customer traffic gains decelerated slightly in the fourth quarter, but they stayed positive and were solidly positive for the full fiscal year. That success allowed the chain to post its first year of comparable-store sales growth since 2012.

It helped McDonald's stand out from most rivals, too. Starbucks' traffic was flat in the most recent quarter, and Shack Shack's has been declining at a 4% pace.

2. Getting back to basics

"We've increased support and excitement via iconic food [that] customers identify with our brands: the Egg McMuffin, the Quarter Pounder With Cheese, Chicken McNuggets, french fries, and our world-famous Big Mac. We have reaffirmed that customers still crave this food and the core of our menu still drives growth."
-- Easterbrook

Limited-time offers and innovative menu launches help goose sales in the short term. It's the core products that differentiate McDonald's from its rivals, though. The company pressed that advantage last year by promoting its biggest brands through value menus.

It also made small but crucial improvements to its ordering and cooking processes so that food arrives hotter and fresher. The reward was higher customer satisfaction and a solid platform McDonald's could use to launch new items, like premium sandwiches and those popular buttermilk chicken tenders.

3. Refranchising

"We ended 2017 with franchised restaurants representing 92% of our total restaurant base, up from 81% three years ago. As a result, franchise margins now comprise more than 80% of our total restaurant margin dollars." 
-- Chief Financial Officer Kevin Ozan

The company completed most of its aggressive refranchising plan last year. And in lowering the proportion of company-owned locations, and exchanging that revenue for franchise fees, rent, and royalties, profitability got a huge boost.

MCD Operating Margin (TTM) Chart

MCD Operating Margin (TTM) data by YCharts

Operating margin soared to 42% of sales from 31.5%. McDonald's has a bit more progress to make on this score, as it plans to raise its proportion of franchised restaurants to 95% from the current 92% mark.

4. Delivery is a win

"During the fourth quarter, delivery gained traction and emerged as a meaningful contributor to our comparable sales in several of our largest markets."
-- Easterbrook

Customers are loving the option to have their food delivered to their home or office. They spend almost twice as much on an average order, and high customer satisfaction is driving healthy repeat business, executives said. That's why investors can expect to hear a lot about delivery in 2018 as the company rolls out the offering to more locations and advertises it heavily. "We're optimistic this will contribute to the momentum of our business," Easterbrook said.

5. Keeping growth going

"We are becoming a better McDonald's. And as we do, it's driving better results. Whilst pleased with the progress we made in 2017, we have far greater ambitions."
-- Easterbrook

A man takes a bite of a burger.

Image source: Getty Images.

Delivery is one of the biggest initiatives aimed at keeping growth going into 2018. Restaurant upgrades are another promising strategy. Mickey D's is rolling out remodels today that improve aesthetics while adding high-return-on-investment technology such as self-order kiosks.

These additions won't come cheap. In fact, the company plans to spend $2.4 billion on capital improvements this year, up from $1.9 billion in 2017. But one of the best parts about having a great operating year is that it generates excess cash you can direct toward defending, and extending, your hard-won market share gains.

Demitrios Kalogeropoulos owns shares of McDonald's and Starbucks. The Motley Fool owns shares of and recommends Starbucks. The Motley Fool is short shares of Shake Shack. The Motley Fool has a disclosure policy.