Despite only owning Time Warner for the final 16 days of the second quarter of 2018, AT&T raked in $9.6 billion in revenue for the period across Time Warner (now called WarnerMedia), its linear and digital TV distribution businesses and its advertising business.

The bulk of that comes from AT&T’s TV distribution business, which is shrinking in terms of revenue and stagnating in terms of subscriber count. AT&T’s three TV services — DirecTV and U-Verse for traditional linear TV and DirecTV Now for over-the-top TV — combined to generate $8.3 billion in revenue for the quarter. That’s 9 percent less than they generated a year ago.

The issue is that AT&T is losing linear TV subscribers and isn’t adding enough subscribers of its comparatively much cheaper digital TV service to offset the revenue loss. During Q2 in the U.S., AT&T lost 262,000 linear TV subscribers, while adding 342,000 DirecTV Now subscribers. The two cancel each other out to keep AT&T’s total TV subscriber count at 25.5 million people. That’s roughly the number AT&T’s held at for the past two years, and it’s an important number to at least maintain as the company looks make more money from those subscribers plus its 89.2 million U.S. wireless subscribers and 14.5 million U.S. broadband internet subscribers.

AT&T’s advertising business centers on the ads it can target to DirecTV, U-Verse and DirecTV Now subscribers. That business, called AdWorks, brought in $461 million in Q2 revenue, up 16 percent year over year, and has brought in more than $1.8 billion in revenue over the past year, AT&T svp and CFO John Stephens said during the company’s earnings call on July 24.

But AT&T is really only beginning to get its advertising business together and extend it beyond its TV services. First, it is generally limited to only selling two minutes’ worth of TV ads per hour on each channel on its TV services. Second, AT&T has yet to close the AppNexus acquisition that will give the company an ad tech platform to sell ads across its own and others’ properties.

Through the Time Warner acquisition, AT&T now has three times the ad inventory to work with, WarnerMedia CEO John Stankey said during the earnings call.

AT&T expects that it will also be able to at least triple the amount of money that the average ad on Turner’s TV networks fetch from advertisers by using AT&T’s subscriber data to sell more targeted (and more expensive) ads. The company can get three to five times more money per ad sold on DirecTV when using its data to target the ads to specific audiences, AT&T CEO Randall Stephenson said during the call.

Even without AT&T’s more lucrative ads, its WarnerMedia properties seem to be faring fine. Beyond the $1.3 billion in revenue that Turner, HBO and Warner Bros. generated in the 16 days that AT&T owned them at the close of Q2, they generated $7.8 billion for the full quarter, a 7 percent increase year over year. Warner Bros. generated the bulk of that full-quarter revenue with $3.3 billion, followed by Turner with $3.2 billion and HBO at $1.7 billion, all of which were up between 4 and 12 percent year over year.

AT&T is already working on squeezing more ad revenue from Turner’s properties. It’s applying the data that AT&T has used to target ads on its TV services to Turner inventory, said Stankey. And AT&T’s Advertising and Analytics organization, led by former GroupM exec Brian Lesser, has already fielded requests from pharmaceutical advertisers seeking 90-second TV ad slots. Given the two minutes of inventory that AT&T is typically allotted, it couldn’t accommodate that request, but now that it owns Turner’s TV inventory as well, it’s in the process of bridging Turner inventory with former AT&T inventory to have have new addressable products, Stankey said.

Looking ahead to 2019, Lesser said the company plans to add inventory from non-AT&T companies. He also has his eyes on how AT&T can use that inventory differently, not only by combining it into longer ad slots but in combining the devices on which an ad can run. Lesser laid out an example where a person could be watching a show on TV, see an icon on a car in the show and then trigger an ad on their phone that they can interact with while automatically pausing the show on TV. “Those ad units will generate a higher CPM and a higher yield,” Lesser said.