Google’s digital advertising empire is regaining the momentum it lost during the pandemic’s early stages as its YouTube video service matures into a major marketing magnet and companies anticipate more spending by cooped-up consumers when the economy reopens.

However, its highly touted cloud service continues to lose billions.

Breaking out cloud segmen figures for the first time, Google reported a $5.6 billion loss for the year, up from $4.65 billion year-over-year and from $4.35 billion in 2018.

Google Cloud “lost $5.61 billion during the full year, and $1.24 billion during Q4, showing that the business is still in investment mode,” noted CNBC.

The comeback highlighted the latest quarterly results released Tuesday by Alphabet Inc., Google’s corporate parent.

As usual, Alphabet generated all but a small fraction of its revenue from Google’s internet-leading ad network, while other companies in its portfolio were mostly a financial drain.

Alphabet earned $15.2 billion on revenue of $56.9 billion during the October-December period, a showing that easily outstripped the projections of Wall Street analysts. Investors hailed the performance by driving up Alphabets’ stock price by more than 5% in extended trading after the numbers came out.

Google’s fourth-quarter ad revenue totaled $46.2 billion, a 22% increase from the same time in the previous year. The growth in the past quarter surpassed the 10% year-over-gain in Google’s ad revenue during the July-September period.

Those increases came after Google’s ad revenue fell 8% during last year’s April-June period that unfolded after most of the U.S. economy had shut down. That marked the first time Google’s quarterly ad revenue had ever declined from the previous year since the company went public in 2004.

When the pandemic first hit, advertisers clamped down on the spending, especially airlines, hotels, cruise lines and other businesses tied to travel. But advertising in those sectors are now recovering in anticipation people will be itching to hit the road later this year, although the travel and hospitality marketing still remains down by 30% to 40% from the pre-pandemic levels, according to a recent analysis by Canaccord Genuity.

While people haven’t been traveling as frequently or as far as they once did, they are watching more video streamed over the internet than ever. That trend has helped attract even more eyeballs to YouTube, a phenomenon that is spurring more advertising on the world’s most watched video site.

Advertising on YouTube during the past quarter rose 46% from the previous year to $6.9 billion.

Things are expected to get even better for Google from here, assuming the COVID-19 vaccine eases the pandemic and enables the economy to reopen as the year progresses. Canaccord Genuity is projecting this year’s worldwide spending on digital ads will climb 15% to $389 billion. That is more in line with the industry’s annual growth during the past decade, except last year when digital ad spending rose by just 8% because of the recession triggered by the pandemic.

Google is well positioned to continue to capture the largest portion of the digital ad market, although it faces a potential challenge to its dominance from several lawsuits filed by the U.S. Justice Department and state attorneys general seeking a court order that could either break up the company or impose reforms undercutting its power.

But the main antitrust case brought by the federal government isn’t scheduled to go to trial until September 2023, leaving Google plenty of time to try to grab an even bigger piece of the advertising pie.