Tech juggernauts Facebook (META 0.27%) and Alphabet (GOOG 0.77%) (GOOGL 0.66%) seemed unstoppable in their efforts to dominate digital advertising until the coronavirus pandemic came along. The resulting global economic downturn forced businesses to reduce expenses, including substantial cuts in advertising spend, and that has had some effect on both companies.

This turn of events led research firm eMarketer to forecast in late June that Alphabet's Google would see ad revenue decline year over year for the first time, yet Facebook would continue to grow. 

But Facebook has not had a trouble-free quarter. Several of its largest advertising brands began to boycott the company in recent months, pulling ad budgets in July to pressure the company to do something to address hate speech and misinformation that is being propagated by some users of the Facebook platform.

The earnings releases from both companies this past week shed light on how each is faring amid these uncertain times. The results can also help investors identify which is the better investment right now.

A closeup of hand on a laptop while digital icons, such as a search magnifying glass, float around the keyboard.

Image source: Getty Images.

Facebook's success

The eMarketer forecast proved correct. Facebook's second-quarter revenue rose 11% year over year. The results make sense given pandemic-induced shelter-in-place restrictions.

More people used Facebook in the quarter as a means to stay in touch, causing daily active users (DAUs) to rise 12% year over year to 1.79 billion. This is also an increase from the first quarter's 1.73 billion DAUs. More ads were shown to more users, delivering revenue growth.

The pandemic drove Facebook revenue in another way. As small businesses were forced to close physical locations due to the pandemic, many switched to online avenues for generating lost income, resulting in greater ad spend on Facebook. In Q1, chief operating officer Sheryl Sandberg stated Facebook had 8 million advertisers. In Q2, that number rose to 9 million.

CEO Mark Zuckerberg addressed the ad boycott from large brands, stating that some "seem to wrongly assume that our business is dependent on a few large advertisers," and that actually the "biggest part of our business is serving small businesses." His comments suggest the boycott will have a modest impact on revenue for the third quarter.

In fact, CFO David Wehner noted Facebook's ad revenue growth rate in the first three weeks of July was similar to Q2's 10% ad revenue growth rate, and this factors in the boycott. He expects the third quarter's ad revenue growth to remain in line with July's.

Alphabet's advantages

Alphabet's first-quarter earnings hinted at the pandemic's revenue impact as CFO Ruth Porat noted year-over-year declines in search ad revenue starting in March. Its second-quarter results underscored the challenging ad environment. Total advertising revenue was $29.9 billion, down from last year's $32.5 billion.

Despite its ad revenue declines, Alphabet's non-advertising business lines are faring well. Google Cloud's growth continued. Its Q2 revenue came in at $3 billion, up from $2.1 billion last year, and $2.8 billion in Q1.

Google's other non-advertising revenue rose 26% year over year from growth in YouTube subscription income and Google's Play store. The non-advertising business lines still represent only $8.1 billion of the company's $38.3 billion total revenue, but provide a bright spot regarding future revenue opportunities.

Also, no other company dominates search engine marketing (SEM) like Google. Its search engine's global market share of 86% puts it far ahead of rivals such as Bing, owned by Microsoft. Consequently, when marketers want to run SEM ad campaigns, Google is their first choice. Once the pandemic passes and the economy recovers, Alphabet's ad revenue will return. There just isn't a viable alternative for advertisers.

The final verdict

Both Facebook and Alphabet are good investment choices. Both possess strong balance sheets. Facebook's total assets of $139.7 billion vastly outstrip total liabilities of $29.2 billion. Similarly, Alphabet's impressive $278.5 billion in total assets outweighs $71.2 billion in total liabilities. Neither company is at financial risk from the pandemic.

Where the two ad giants differ is that Facebook's business is almost entirely dependent on advertising. Ad revenue accounted for $18.3 billion of the company's $18.7 billion in total revenue.

Meanwhile, Alphabet holds a dominant position in the SEM market and a more diversified business. Even with diminished ad revenue, Alphabet's board authorized share repurchases of up to $28 billion of its Class C stock. And according to Porat, as the second quarter progressed, Alphabet already experienced a gradual improvement in search advertising.

So, if you had to choose one company, these factors give Alphabet the edge as a better investment choice right now.