Amazon (AMZN -0.91%) reported second-quarter results last week that were less than fantastic, sending its stock price down by 7.5%. Since eBay's (EBAY -0.87%) business is similar to Amazon's, eBay's stock price fell along with Amazon's. 

The thinking is that if Amazon reported a less-than-stellar quarter, eBay probably had a bad quarter as well. However, there was a silver lining in Amazon's report that was a good sign for eBay when it reports second-quarter earnings on Aug. 11. Let's take a closer look at what that was. 

Miniature boxes on top of a laptop.

Amazon reported an 83% increase in ad revenue. Image source: Getty Images.

Ad revenue is emerging

Amazon increased ad revenue by 83% from the same quarter a year ago. What's more, the segment has accelerated its growth rate in four consecutive quarters. Certainly, businesses appreciate the opportunity to get the attention of 200 million-plus Prime members. These customers have their payment information on file, have access to fast and free shipping services, and are one click away from making a purchase. By advertising on Amazon, marketers are piggybacking on the infrastructure, physical and digital, that Amazon has built.

Similarly, eBay is building out an advertising business. The company has 187 million active buyers, who also have payment information on file and are a few clicks away from purchasing. The difference here is that eBay's buyers are not paying members who get fast and free shipping access. Amazon doesn't report its total active buyers, but you can assume it's much larger than the 200 million Prime members.

Therefore, eBay will not generate as much ad revenue as Amazon will, but it can still benefit from the trend of businesses looking to market to e-commerce shoppers with payment information on file. Indeed, in all of 2020, eBay reported $1 billion in ad revenue, while Amazon earned $7.9 billion in the most recent quarter alone. 

Importantly, ad revenue comes with high-profit margins. There is little cost associated with incremental ad sales after spending on the initial technology to build out the service offering. The process is mostly automated. Therefore, boosting ad sales as a percentage of overall revenue could increase profitability for Amazon and eBay alike. 

What this could mean for investors

A chart showing eBay and Amazon price to earning ratio over time.

Data source: YCharts

Admittedly, Amazon's reported deceleration in retail sales is not good news for eBay. It likely indicates consumers shifting their shopping behavior back to brick-and-mortar stores as economies reopen worldwide. Still, the trend is just a reversal from the short-term pandemic boost. In the long run, more and more shopping will be done online. The convenience benefits far outweigh shopping in brick-and-mortar stores. 

Meanwhile, investor pessimism on these two e-commerce stocks has dropped their prices to attractive levels. Investors can buy Amazon at a price-to-earnings ratio near three-year lows, and eBay is trading at a very favorable P/E ratio of 16.56 (see chart). There could be additional volatility ahead for their stock prices as economies continue to reopen. Long-run investors can put these stocks on their watch lists and wait for an opportunity to get these great companies at bargain prices.