It's been a welcome summer of love for Groupon (GRPN -2.06%) investors. Shares of the daily deals leader rose 8.4% last week, ticking higher after posting mixed quarterly results. The stock has soared 42% since bottoming out two months ago. 

Groupon's results may seem disappointing at first glance. Revenue declined 8% to $662.6 million, its weakest top-line growth in Groupon's six years as a publicly traded company. Analysts were holding out for $666.8 million. The record won't last long. Its outlook for the current quarter calls for less than $650 million in revenue, a decline of at least 10% as well as a sequential dip and also below Wall Street's target of $661.7 million.

Investors still bid up the stock after the top-line miss, and this is where quality of revenue is important. Groupon's revenue has come under pressure as it backs out of unprofitable international markets. Closer to home, it's been relying less on the sale of physical goods, as a 13% dip in Groupon Goods sandbagged results. The byproduct of leaning less on weak international operations and Groupon Goods is that margins are improving dramatically. Groupon posted adjusted earnings of $0.02 a share, its third consecutive profit. Analysts were expecting Groupon to merely break even.

"Groupon" written on its HQ's glass doors.

Image source: Groupon. https://www.groupon.com/press/multimedia 

Art of the deal

Scaling back overseas and with Groupon Goods has allowed the reinvigorated dot-com deal maker to slash its payroll and other expenses. Focusing on high-margin local vouchers finds it reporting positive free cash flow. Free cash flow was negative for the second quarter but positive for the trailing year and Groupon is still standing by its forecast of meaningful free cash flow for all of 2017. It's also raising the low end of its adjusted EBITDA guidance for the entire year.

We're now three months removed from the stock taking a hit after its disappointing first-quarter report, and the rallying shares suggest that the market's warming up to the leaner and more fiscally sound Groupon. Samuel Kemp at Piper Jaffray rang the dinner bell following the report. He feels that Groupon's guidance for the second half of the year is conservative, and he's reiterating his overweight rating and $5.50 share price.

Groupon's being more financially prudent, but it's not faltering in its magnetism. It increased its active customer base to 31.9 million in North America, adding 300,000 more deal seekers during the quarter. Armed with its cash-rich and debt-free balance sheet, Groupon is doing all the right things for a company where the top-line slide is the mother of all mirages.