TripAdvisor (TRIP -0.83%) has been working hard for a long time to establish itself as a giant in the online travel business, and immense competition has made this task a tough one to accomplish. Having sought to make a transition from focusing on gathering reviews and other travel-related information to instead offering direct booking services, TripAdvisor has to walk a fine line to keep its reputation intact while expanding to become more profitable.

Coming into Tuesday's first-quarter financial report, TripAdvisor investors had expected to see declines in both its top and bottom lines. Instead, both figures gained ground on an adjusted basis, and that good news led many shareholders to reassess their views on just how quickly TripAdvisor could climb to the next level in online travel.

Space shuttle and other spacecraft in museum setting.

Reviews of attractions like the Space Shuttle exhibit distinguish TripAdvisor's website. Image source: TripAdvisor.

How TripAdvisor's quarter went

TripAdvisor's first-quarter results exceeded all expectations. Revenue was up modestly, rising 2% to $378 million, but that was quite a bit better than the 3% drop most of those following the stock were expecting. Adjusted net income jumped 20% to $42 million, and the corresponding adjusted earnings of $0.30 per share crushed the consensus forecast for just $0.16 per share.

TripAdvisor leaned once again on its non-hotel business to generate the growth that surprised its investors so much. Non-hotel revenue grew 36%, accelerating dramatically from its fourth-quarter performance, as strength in TripAdvisor's experiences and restaurants categories led the way forward for the company. The segment still lost money, but operating losses were only about half as big as they were in the year-ago quarter.

Hotels were still a drag on TripAdvisor, but even there, the news was fairly good. Overall segment sales dropped 5%, but the segment's bottom line was pretty much flat compared to year-earlier figures. As we've seen in past quarters, display ads and subscriptions produced revenue growth that was more than offset by the declines in click-based and transactional revenue. Margin levels for the segment rose, although TripAdvisor said favorable currency impacts played a key role in helping the company.

Operationally, TripAdvisor looked strong. User reviews and opinion counts soared 26% to 630 million, featuring 7.5 million notable items that included 1.2 million lodging sites, 800,000 rental properties, 4.6 million restaurants, and 940,000 activities and experiences across the globe. Average monthly unique hotel shoppers were flat at 149 million, but unique visitors on the company's branded websites were higher by 12% to 433 million.

What's ahead for TripAdvisor?

CEO Steve Kaufer celebrated the news. "We had a strong start to 2018," Kaufer said. "Our hotel results were ahead of our expectations, and we delivered accelerated non-hotel revenue growth." The CEO also noted that initiatives geared toward long-term profit growth remain ongoing, and that TripAdvisor is executing well on its opportunities.

Indeed, TripAdvisor's optimism showed up in its outlook for the full 2018 year. The company was happy enough with how 2018 began that it now expects it will be able to deliver at least some adjusted pre-tax operating earnings growth during the year. That's up from previous forecasts for flat performance. Even though TripAdvisor still sees hotel-based revenue falling from 2017 levels, the online travel company has positive views about its potential to see adverse trends reverse course and start turning more favorable toward the end of the year.

That optimism was also apparent from TripAdvisor's capital strategy. Having authorized $250 million toward a stock repurchase, TripAdvisor spent $100 million of that through early May, having bought back 2.6 million shares. That implies a price close to its current stock price. The repurchases didn't have a huge impact on its balance sheet, suggesting that further buybacks could be coming.

TripAdvisor shareholders were positively surprised by the news, and the stock soared almost 20% in after-hours trading following the announcement. A similar uptick in enthusiasm last quarter faded, but a repeat performance should give investors more confidence about the staying power TripAdvisor is building in the online travel space.