By Anne Steele

Spotify Technology SA said customers' overall time spent listening to the music-streaming service returned to prepandemic levels and its advertising business is showing signs of recovery as habits began to normalize in the second quarter after an initial upset brought on by Covid-19.

The Stockholm-based company deepened its loss in the three-month period ended June 30, as its recent stock run-up came with higher-than-expected payroll taxes that offset strong user growth.

The global health crisis began to drag on the business in the first quarter, with declines in daily active users and overall listening. However, by the end of June all regions had come back except for Latin America, where cases have risen sharply.

"The big news here is that there isn't really a lot of big news," said Chief Executive Daniel Ek in an interview. "We're lucky in that we have a business where there's been a macro tailwind toward digital business."

In-car listening by the end of the quarter was less than 10% below pre-Covid-19 levels, an improvement from a 50% decline that had dragged through April. Meanwhile, Spotify has seen at-home listening on shared devices like smart speakers and smart TVs rise dramatically amid the pandemic.

"That had never been a forte for Spotify before, we were more of a mobile play," said Mr. Ek. "That trend has been strong for us."

Finance chief Paul Vogel said the service added more users and subscribers in the first half of this year than the first half of last year.

"We feel really good about how we're performing," he said.

At the end of the second quarter Spotify had 299 million monthly active users and 138 million paying subscribers, its most lucrative type of customer, with both coming in at the top of its guidance. Growth in North America was stronger than the company expected, more than making up for softness in Latin America and other emerging markets that registered upticks in subscriber cancellations and payment failures.

During the quarter, average revenue per user for the subscription business slipped 9% to EUR4.41 ($5.17). The decline stemmed mostly from new subscribers coming in via discounted plans through family and student accounts as well as lower pricing power in new international markets.

Spotify's revenue from subscriptions climbed 17% to EUR1.76 billion. Ad-supported revenue -- which had been on a double-digit rise before the pandemic -- slid 21% to EUR131 million. The company said ad sales slowed amid the pandemic but started to improve in June, and podcast advertising performed better than anticipated. Advertising is a relatively small part of Spotify's business, accounting for 10% or less of overall revenue, but has been a growth area over the past year, as the company has expanded its podcast business.

The company said 21% of its monthly active users now listen to podcasts, up from 19% in the previous quarter, while overall consumption of podcasts more than doubled.

In all for the period, Spotify posted a loss of EUR356 million, or EUR1.91 a share, versus a loss of EUR76 million, or 42 European cents a share, in the year-earlier quarter. A recent spate of deals has run the company's stock up more than 70% since the end of May, when comedian Joe Rogan's podcast was announced to be coming exclusively to Spotify. The deeper loss was owing to the taxes the company accrues on its employees in Sweden -- accounting for more than one-third of its workforce -- as determined by the stock price at the end of each quarter.

During the quarter, the company also announced exclusive podcasting deals with Warner Bros.'s DC superhero brand and Kim Kardashian. The exclusivity, Mr. Ek said on an investor call, is a key component of Spotify's strategy, as it sees podcasts attract engaged listeners who also stream more music.

"What we're seeing here is the beginning of a flywheel. With every piece of content we're adding and successfully serving to users we're creating more engagement and that leads to lower churn," he said. "These users, when they find great shows, are sharing them on social media and creating this virtuous cycle."

Last week, Spotify struck a new licensing agreement with Vivendi SA's Universal Music Group that signs the largest music company onto its "two-sided marketplace" for selling marketing and data back to labels.

Also this month, Spotify launched in Russia and a dozen other European markets. Mr. Ek said the service had a bigger launch there than it had in India, where it added more than one million users in the first week.

Free cash flow -- a measure of the cash a company generates from operations and a gauge that many investors view as a proxy for performance -- was EUR27 million, down from EUR50 million a year earlier.

Revenue rose 13% to EUR1.89 billion, in line with guidance.

For the current quarter, the company forecast monthly active users to grow to between 312 million and 317 million, and for premium subscribers to rise to between 140 million and 144 million. Revenue is expected to come in between EUR1.85 billion and EUR2.05 billion.

News Corp's Dow Jones & Co., publisher of The Wall Street Journal, has a content partnership with Spotify's Gimlet Media unit.

Write to Anne Steele at Anne.Steele@wsj.com