Starbucks (NASDAQ:SBUX) shares surged this week, following the coffee giant's fiscal third-quarter update. Shares were up nearly 10% on Friday as investors digested the company's better-than-expected revenue and non-GAAP earnings per share during the period.

Strong performance in the company's two most important markets -- the U.S. and China -- helped drive the quarter's surprise upside. Comparable store sales in these markets increased 7% and 6%, respectively.

But there was another key catalyst for the quarter that investors shouldn't overlook: continued stellar performance from Starbucks' digital efforts.

A woman using Starbucks' mobile loyalty program

Image source: Starbucks.

Digital momentum

"Digital programs, including loyalty and delivery, contributed meaningfully to the quarter's performance," said Starbucks' CEO Kevin Johnson in the company's second-quarter earnings call. 

Highlighting the company's momentum in digital, Starbucks' mobile rewards program in the U.S. saw its active members rise 14%  year over year to 17.2 million members. This is an acceleration compared to 13% growth in fiscal Q2. 

Digital sales are playing a material role in driving growth at Starbucks, as Johnson noted that two percentage points of its comp growth in the U.S. were driven specifically by the company's digital loyalty program. In addition, Starbucks said its loyalty program accounted for 42% of U.S. tender during the quarter.

Strong digital performance in China, too

But Starbucks isn't just seeing success digitally in the U.S. The company is taking what it learned from the program and applying it to the important China market. Johnson explained during Starbucks' earnings call that the company's "digital ecosystem remains a core pillar in driving long-term growth" in China. For instance, the company's rewards program in the market now has 9.1 million active members. This is up from 8.3 million in fiscal Q2.

The company is also seeing its digital efforts pay off in helping drive sales through delivery in China. Starbucks' digital partnership with Alibaba has helped delivery expand to 2,900 stores in the market by the end of fiscal Q3. Further, Starbucks said that delivery accounted for 6% of total sales in the market during the period.

Capitalizing on a key growth trend

The importance of digital as a key catalyst for revenue growth is a common thread throughout the restaurant industry -- and companies executing well on the trend are benefiting. Chipotle (NYSE:CMG), for instance, saw its digital sales nearly double year over year in its most recent quarter, rising to represent 18% of sales. 

It's no wonder that companies like Starbucks and Chipotle are investing in improving their ability to connect with customers digitally. Digital customers are more engaged as they have a deeper relationship with companies. "[D]igital relationships drive significant long-term value to Starbucks through more frequent occasions, increased spend, improved customer retention and marketing efficiency," Johnson explained during Starbucks earnings call.

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.