Americans visit coffee shops more than they do any other type of restaurant, according to data from Foursquare. The data-gathering company analyzed foot traffic to determine that overall traffic to coffee shops in the United States grew by 1.7% year over year during the first half of the year. That was driven by small, independent shops, which saw a 5% increase, while larger chains saw traffic grow by less than 1%.

That's not as bad as it seems for the big brands, because while growth has accelerated for small brands with limited locations, large national chains "continue to maintain a greater overall share of wallet," according to Foursquare. In addition, those larger brands continue to hold the highest levels of customer loyalty.

A cup of coffee with a smiley face in the foam.

Bigger brands still dominate the coffee market. Image source: Getty Images.

Which coffee chains have the most-loyal customers?

It's worth noting that customer loyalty might only go so far when it comes to coffee. People will travel up to five miles to go to a grocery story and three miles to purchase fast food, but are only willing to travel one mile to get coffee, according to Foursquare's data.

To determine which coffee chains have the most-loyal customers, the data intelligence company looked at a number of factors including visit frequency and share of category traffic. It found that companies that paired food and coffee came out on top. As you can see, national chains known for coffee led the way while fast-food leader McDonald's is noticeably missing.

  1. Starbucks (NASDAQ:SBUX)
  2. Dunkin' Brands' Dunkin Donuts  (NASDAQ:DNKN)
  3. Tim Horton's
  4. Scooter's Coffee & Yogurt
  5. Dutch Bros. Coffee
  6. Caribou Coffee
  7. Biggby Coffee
  8. PJ's
  9. Dunn Bros.
  10. Colectivo Coffee

According to the list above, the two U.S. restaurant brands most-known for coffee (Starbucks and Dunkin' Donuts) have the most loyal customers. That, however, might be the result of ubiquity and convenience. Among what Foursquare defines as "fanatic" coffee drinkers -- people who visit coffee shops at least four times a week -- Starbucks and Dunkin' rank eighth and 10th respectively when it comes to likely visitors.

What do the data mean? 

Some people want to have a less-mainstream experience when they get their coffee and that can fuel traffic at smaller, niche coffee shops. Starbucks and Dunkin' succeed by appealing to the lion's share of those who buy their coffee outside the home. They might lose customers who want more cachet, but Starbucks is hedging against that with its Reserve and Roastery brands that allow people to spend more and experience some of the know-it-all snobbery that goes with not being mainstream. Dunkin', of course, courts a more mainstream crowd, and it's unlikely that it attracted too many coffee snobs in the first place. Its customers who count as "fanatics" are probably more likely to leave for a fast-food rival or a convenience store than an up-and-coming, trendy chain.

Daniel B. Kline has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.