SAN FRANCISCO (AP) _ Google is introducing a way for shoppers browsing on their smartphones to buy merchandise by tapping on a button included in the ads appearing in its search results.

The buying button unveiled Wednesday is part of Google’s attempt to make it easier for people to shop on mobile devices and divert online traffic from e-commerce leader Inc.

The feature, called “Purchases on Google,” completes sales using financial information that already has been stored with Google. Participating merchants can still gather information about customers using Google’s buying button.

Facebook also has been testing a similar buying button in ads appearing in its social network.

About a dozen retailers are initially using Google’s buying button. Google is hoping to increase the number of merchants before the end of this year.