Larry Page, CEO of Google's parent, Alphabet. David Paul Morris | Bloomberg | Getty Images

Alphabet managed to buck backlash over its ad platform in the first quarter, reporting better-than-expected quarterly earnings and revenue on Thursday. The company saw mobile search and ongoing strength in YouTube driving ad sales higher, while sales on Google Play, hardware and cloud grew substantially, said chief financial officer Ruth Porat. Shares rose more than 4 percent after hours, as executives said more consumers are turning to smartphones for content — and for ads.

Adjusted earnings post a healthy beat

(for Class A shares) EPS: $7.73 vs. $7.39 a share expected, according to a Thomson Reuters consensus estimate

Revenue: $24.75 billion vs. $24.22 billion expected, according to a Thomson Reuters consensus estimate

That's up compared to a year ago, when the Google parent reported adjusted first-quarter earnings of $6.02 per share on $20.26 billion in revenue (That means revenue increased 22 percent over the past year.)

Extremist content weighs on advertisers, even as stock climbs during 2017

Alphabet, the public holding company of Google, makes most of its money from advertising in its core search function and on YouTube. Advertising revenues rose to $21.4 billion during the quarter, up from a little over $18 billion a year ago. Net income was $5.43 billion, up from $4.21 billion a year ago. Those ads made headlines over the last two months after The Times of London's investigation found Google's YouTube video site ran ads for major brands next to neo-Nazi and jihadist videos. In response, major brands around the world like AT&T and Johnson & Johnson announced they would suspend some digital advertising as Google made changes to its system. Still, revenues grew from last year in every geography: the U.S., Europe, the Middle East and Africa, Asia Pacific, and the other Americas. Alphabet shares are up more than 23.5 percent over the past year, and nearly 12.5 percent so far this year. Traffic acquisition costs in the Google network were $4.63 billion, slightly higher than the $4.41 billion expected by StreetAccount. Mobile is more expensive to support, Porat said. But revenue on Google properties, other revenue, and sales on the Google network all came in slightly above estimates. Alphabet's so-called Other Bets category — which includes internet company Google Fiber, smart-home brand Nest, self-driving car company Waymo and divisions for life sciences and venture capital investing — has been under pressure as the company streamlines its spending.