Attracting people was never a problem for Twitter Inc. (NYSE: TWTR), which currently boasts more than 250 million active monthly users. But transforming the micro-blogging site's popularity into revenue is still a challenge. E-commerce may be answer. In buying payments service CardSpring Inc., Twitter hopes to encourage users to shop in "real time." Many strategic buyers are also snapping up e-commerce technology startups. 

By bringing real-time shopping into tweeting, Twitter is testing how innovative social media can be, hoping advertisers see how ad space influences consumer behavior. With CardSpring, retailers can offer online shoppers coupons that they can automatically sync to their credit cards in order to receive discounts when they shop in physical stores.

"As we work on the future of commerce on Twitter, we're confident the CardSpring team and the technology they've built are a great fit with our philosophy regarding the best ways to bring in-the-moment commerce experiences to our users," says Twitter's head of commerce Nathan Hubbard.

Twitter tapped Hubbard, the former CEO of Ticketmaster, in 2013 as part of its push to generate e-commerce capabilities. His hiring, and Twitter's recent buy, coincide with the company's efforts to keep users from leaving the website when purchasing items. For example, Twitter partnered with Starbucks Corp. (Nasda: SBUX) and American Express Co. (NYSE: AXP) on some campaigns, and teamed up with Amazon.com (Nasdaq: AMZN), where users can add Amazon products to their shopping cart via Twitter by responding to a product tweet with a hashtag, #AmazonCart.

In June, Twitter agreed to pay nearly $100 million to acquire TapCommerce, which targets people on mobile devices with ads for items they have expressed interest in buying around the Internet and urges them to complete the purchase.

Facebook Inc. (Nasdaq: FB), not far behind, is currently testing a feature that lets advertisers sell products directly through ads they purchase on the social network.

Other e-commerce deals have surfaced. Stamps.com Inc. (Nasdaq: STMP) kicked off the summer by paying $50 million for ShipStation, an Austin, Texas-based provider of services to support automatic order importing from various online shopping carts, including eBay Inc. (Nasdaq: EBAY), Amazon and Shopify Inc. The company also offers shipping options and delivery services.

Shortly after that deal, Care.com Inc. (NYSE:CRCM) paid $48.6 million for Citrus Lane in July. Prior to that, the Waltham, Massachusetts company was only able to assist users in finding services to meet family needs, such as childcare, tutoring and housekeeping. With Citrus Lane, Care.com is now able to sell and ship items such as baby clothes, books, toys and other accessories to families with kids.

For more coverage on social media and M&A, see "How to Leverage Social Media in Dealmaking."