"Retail recession? What retail recession?"

Ulta Beauty (NASDAQ:ULTA) shareholders may be asking themselves that question as the beauty and cosmetics retailer posted stunning first quarter 2017 results late last month that have sent the stock soaring to fresh all-time highs.

Most impressive was the continued streak of comparable store sales growth, which came in at 14.4% in the quarter -- made all the more improbable as the numbers came on top of 15.2% growth in the prior year period. That means the average store increased its revenue by 32% in two years, while much of the brick-and-mortar retail industry endured a beating.

As Foolish investors, we always look to assess the underlying drivers of such outperformance to determine if its sustainable. For Ulta Beauty, not only did I find this to be the case, but there is even more room for improvement.

Close-up view of a variety of cosmetic products

Image source: Getty Images.

Loyalty is paramount

There is perhaps no more important metric for Ulta Salon (besides comparable sales) than its loyalty member count, which keeps customers hooked to the Ulta ecosystem, preventing them from going to competitors like Sephora or even Amazon. Loyalty members make up a majority of Ulta revenue, in addition to serving as a treasure trove of customer data, so member growth can serve as a leading indicator of future success.

In the quarter, loyalty members grew by 1.1 million members to 24.5 million in total, up 26% year over year. While the company expects this growth rate to moderate, as it is lapping tough comps, management still expects this number to grow faster than square footage expansion (12% last quarter).

Increasing loyalty membership ahead of square footage growth means each store will likely be more productive. We saw this in the previous period as operating margins expanded to 14.3% from 13.7% a year ago, on the way toward the company's goal of 15% for 2019.

A great leap forward for e-commerce

While the company's stores outperformed, Ulta also saw e-commerce sales of $104.3 million, up 70.9% year over year. This marks the highest e-commerce growth rate since the first quarter of 2014, made all the more impressive since the growth was off a much larger base.

Previous investments in new distribution centers, customer relationship management, and inventory management bore fruit this quarter. In fact, CEO Mary Dillon noted during the latest earnings call, "the margin, yes, it's somewhat lower on our e-commerce business. And we don't really break this out in a lot of detail. But basically, they are pretty -- it's getting closer. The gap is not that large, and it's actually closing."

This is very important, because many retailers' e-commerce segments are much lower margin than in-store sales, so e-commerce can not only cannibalize existing sales but also reduce profitability in the process. But not so with Ulta -- e-commerce margins growing, and Dillon also pointed out that e-commerce is largely incremental so not cannibalizing sales in the stores. In fact, the average e-commerce Ulta shopper also bought in-store, 2.5 times more than the average store-only shopper.

Upping the salon game

Despite the robust overall results, the company is fixated on growing its Salon market share. That segment grew only 16.7% in the quarter, trailing company-wide revenue growth. Ulta believes the Salon can do better and recently announced the formation of the Ulta Beauty Pro Team last month, featuring five leading celebrity hair stylists from L'Anza, Wella Professionals, Redken, and Matrix.

These experts will educate Ulta's 88 in-house hair educators, who will then teach Ulta stylists across the country new designs and professional techniques.

This is interesting, as Ulta's Salon segment has been the "laggard" of the company so far, if you can call it that. If the Salon offerings can rise above that of a middle-of-the-road national chain to that of a more premiere hair destination, it could not only grow the segment but also lead to incremental purchases in-store, should the salon see more traffic.

Woman getting her her reconditioned

Image source: Getty Images.

MAC is coming

Finally, the company recently launched 600 MAC makeup SKUs (stock-keeping units) online and will open up its first MAC boutique in Davenport, Iowa in June, with the goal of 100 in-store boutiques by the end of the year, or 10% of the store base.

As I previously wrote, MAC is the number one prestige brand in the country. Given that the brand just released on the Ulta website and is not even in physical stores yet, look for the company to create incremental buzz and sales off of an already-strong start to the year.

Just because Ulta Salon is firing on all cylinders does not mean it can't find another gear. While the stock is rather expensive at 38 times forward earnings, the company can justify that multiple with its stellar performance and new initiatives.

Billy Duberstein owns shares of Amazon and Ulta Beauty, Inc. The Motley Fool owns shares of and recommends Amazon and Ulta Beauty, Inc.. The Motley Fool has a disclosure policy.