The acquisition would help AT&T create new revenue streams to help support its growing entertainment business, now that its acquisition of Time Warner is complete. AT&T has long said content from Time Warner, now renamed WarnerMedia, would help it develop new products and targeted ads across its platforms. By combining consumer data from AT&T's wireless, pay TV and broadband businesses and advertising inventory on WarnerMedia's popular networks like CNN and TBS, the company said it could take on Google and Facebook, two companies that dominate in digital advertising.

But unlike cable and satellite packages, the streaming services come at a much lower price and don't require a long-term contract. That's why, AT&T executives said, they're looking to targeted ads to drive up profitability.

At an investor conference last week, AT&T chief executive Randall Stephenson said ad technology is one of the ingredients that the legacy telecom needs to become a "modern media company." He said it can turn insights about consumers, such as their favorite shows, to serve them customized ads.

"You begin to have understanding of the customer that is really, really unique," he said at the Wells Fargo Securities Telecom 5G Forum. "With ad technology, we're demonstrating already with the small ad inventory we have today, that's very powerful that you can create some serious value when you combine those."

At previous speaking events, Stephenson said AT&T would acquire an ad-tech company to speed up the rollout of its new ad platform.

AppNexus will become part of AT&T's advertising and analytics division, run by Brian Lesser, the company said in a statement.

"The combination of AT&T advertising & analytics and AppNexus will help deliver a world-class advertising platform that provides brands and publishers a new and innovative way to reach consumers in the marketplace today," Lesser said in a news release announcing the acquisition.