A continued rebound in digital ad spending at Google drove its parent company’s profit up 68% in the third quarter.

Mountain View, California-based Alphabet Inc. said Tuesday that it earned $18.94 billion, or $27.99 per share, in the July-September period. Revenue rose 41% to $65.12 billion.

Analysts polled by FactSet expected earnings of $23.73 per share on revenue of $63.53 billion. Shares slipped less than 1% to $2,763 in after-hours trading.

Sundar Pichai, CEO of Alphabet and Google, noted several reasons for the growth:

“Five years ago, I laid out our vision to become an AI-first company. This quarter’s results show how our investments there are enabling us to build more helpful products for people and our partners. Ongoing improvements to Search, and the new Pixel 6 [phone], are great examples. And as the digital transformation and shift to hybrid work continue, our Cloud services are helping organizations collaborate and stay secure.”

Google is the world’s dominant search engine, owns the biggest mobile operating system in Android and runs the behemoth video site YouTube. It holds 29% of the global $455 billion digital ad market, according to eMarketer, followed closely by Facebook. Both tech giants are benefiting as companies that scaled back on advertising last year during the pandemic pump more money into marketing.

The company’s dominance has drawn scrutiny for years, and regulators in the U.S. and other countries have gone after Google over different aspects of its business, including search, ads and its app store, to try to curtail its reach.

The advertising business, the core of the company, rose 43% to $53.13 billion, with retail “by far” the largest contributor to that growth, said Google chief business officer Philipp Schindler. The company sees a lot of potential in retail, including YouTube ads that let users buy directly from creators’ videos. YouTube’s ad revenue jumped 43%, to $7.21 billion, in the most recent quarter.

Ruth Porat, CFO of Alphabet and Google, pointed out: “Our consistent investments to support long-term growth are reflected in strong financial performance, with revenues of $65.1 billion in the quarter. We continued to deliver across our business by providing helpful and valuable experiences for both consumers and our partners.”

Synovus analyst Dan Morgan said it appeared that Apple’s recent iOS 14 privacy changes, which make it more difficult for companies to track users and target ads, were affecting results at Snapchat and Facebook more than they were at Google. Asked about the impact Tuesday, Google CFO Ruth Porat said only that Apple’s changes had a modest impact on YouTube’s revenue.

Google is also trying to get a bigger piece of the cloud-computing business, where it competes with Microsoft and Amazon. That division climbed 45% to $4.99 billion, with an operating loss of $644 million.