Facebook Inc. is expected to post a sharp increase in quarterly revenue and profit as it benefits from a wave of digital ad spending while facing the prospect of Apple Inc.’s privacy changes hampering its ad-targeting capabilities.

The social-media giant’s first-quarter earnings report, due Wednesday afternoon, should reflect the past year’s trend of people spending more time and money online and advertisers redirecting their resources to take advantage of that shift. The parent of Facebook, Instagram and WhatsApp also likely benefited from an increase in consumers making purchases from brands directly through its apps, analysts say.

Facebook’s revenue is projected to rise 34% from a year earlier to $23.73 billion, according to analysts polled by FactSet. Profit is projected to rise 39% to $6.8 billion, or $2.35 a share.

The anticipated strong results come as Google parent Alphabet Inc. on Tuesday said it shattered sales records for the first quarter and that profit more than doubled. Also Tuesday image-sharing platform Pinterest Inc. said revenue jumped 78% and last week Snap Inc. said its quarterly revenue rose 66% as it gained more Snapchat users. Twitter Inc. is scheduled to release its quarterly financial report Thursday.