By Jared Council

International Business Machines Corp. is partnering with Nielsen Holdings PLC to offer an AI-powered service that targets digital ads based on weather and retail sales data.

The service, Watson Advertising Weather Targeting, uses machine-learning models to find correlations between weather and sales data across the U.S., and then recommends actions for marketers. For instance, if the artificial intelligence notices that consumers in a geographical area tend to buy a certain type of wine when temperatures reach a certain level, it can trigger online ads for such products in that location.

It is powered by hundreds of millions of data points from IBM's Weather Co. unit, as well as data from Nielsen's Retail Measurement Services, which captures product-level transaction data from more than 900,000 retailers across the globe, according to the companies.

U.S. digital advertising sales, which include search and display ads, are forecast to top $134.6 billion in 2020, according to research firm eMarketer, up 1.7% from 2019, with tech giants Alphabet Inc.'s Google, Facebook Inc. and Amazon.com Inc. dominating the market.

As the industry shifts away from traditional third-party cookies for ad targeting, IBM Watson Advertising, whose client list of roughly 1,000 companies includes CVS and State Farm, is counting on AI-based targeting tools that don't use cookies to make inroads.

"We've long believed in the value AI can offer to the advertising industry by solving critical challenges across data safety, fraud, transparency and targeting," said Sheri Bachstein, vice president and global head of IBM Watson Advertising and Weather Co.

The system, which will be available later this month, can analyze more than 500 weather and sales signals across the roughly 42,000 ZIP Codes in the U.S., making recommendations hourly as conditions change.

IBM said in testing its AI discovered a 49% increase in outdoor pest-control product sales in the northwestern part of the central U.S. during clear conditions, for instance, and a 26% increase in charcoal sales throughout the South when minimum wind chills exceed the average.

The service initially will only be available in the U.S.

David Olesnevich, the head of product at IBM Watson Advertising, said the company previously used weather to help target ads, but never had access to granular, frequently updated retail-sales data until the Nielsen partnership.

Google in January said it planned to phase out third-party cookies, which tracks users from site to site, on its Chrome web browser by 2022. And an Apple Inc. iOS14 update this fall will prevent Facebook Inc. and other companies that facilitate online advertising from collecting a person's advertising identifier without the user's permission.

Gartner Inc. research director Eric Schmitt said it is difficult to find any approach that outperforms hypertargeted, cookie-based ads. But he added that consumer-goods companies can do without that level of precision.

"There's no doubt that that balance is kind of returning between audience hypertargeting and what we call contextual buys, where you're not buying people per se; you're buying people who have something in common, like watching the same show or experiencing the same weather," said Mr. Schmitt.

Write to Jared Council at jared.council@wsj.com