WASHINGTON — President Trump’s reelection campaign is pouring hundreds of thousands of dollars into digital ads targeting New Yorkers, despite his home state being solidly Democratic, in a bid to boost its donor list, The Post has learned.

Team Trump has invested nearly $1 million in Facebook and Google ads directed at New Yorkers this year alone, making it the No. 4 target in the nation of Trump’s digital ad spending, according to data compiled by Priorities USA and obtained by The Post.

A Trump campaign spokesperson said they don’t discuss digital strategy.

So why is Trump pouring so much green into a state that is so blue? Campaign experts say Trump is going where the money is.

“It’s smart spending. They are taking their money and using it to build up their prospect list of potential grassroots donors,” said Jason Weingartner, former executive director of the New York GOP and now principal at J&W Strategies, a fundraising firm.

Trump fans click on the ads, provide their contact information and donate a few bucks to Trump’s cause — which is fighting back against impeachment in his most recent ad blitz. The campaign then can target that list in the future with messaging and fundraising emails.

“They lost the election. Now they want to steal this one. Don’t let them,” a new Trump anti-impeachment ad says, directing supporters to his campaign page to sign up and “Join the Fight.”

Records show that New York has been the fourth greatest source of money for Trump — behind Texas, Florida and California, according to the Center for Responsive Politics.

So far, New Yorkers, including those attending high-dollar fundraising dinners, have contributed at least $2 million to Trump’s reelection campaign and account for 5.4% of this campaign donations.

New York was also the No. 4 donor state for Mitt Romney in 2012 and John McCain in 2008, but both former presidential GOP nominees had a higher share of their money come from the Empire State at 7%, Center for Responsive Politics data show.

New York ranks No. 4 for President Trump’s Google and Facebook ad spending, according to Priorities USA data.

No other political campaign has spent as much as Trump in digital ads – more than $20 million already in Facebook ads alone since May 2018 and nearly $10 million on Google ads between two campaign committees.

Most of that spending — $21 million — came in the first nine months of this year, according to Priorities USA, the major Democratic super PAC, which analyzed data from the social media companies. New York accounts for about 4.5% of Trump’s total share of digital ad spending.

“Two of the four states he’s spending the most digital money are California and New York. I can assure he’s not doing that because California and New York are now targeted states for the Trump campaign,” said Guy Cecil, chairman of Priorities USA.

The Super PAC plans to spend $100 million in key swing states like Florida, Pennsylvania, Michigan, Wisconsin, Nevada and New Hampshire to convince voters that Trump’s health care, tax and economic policies have harmed middle-class Americans.

“He is talking to his base. He’s raising money. He’s trying to gin up folks,” Cecil said. “He has no interest in talking to getable voters. That gives us an opportunity.”

The Trump campaign Monday offered a glimpse into how its digital ad strategy was translating into big bucks. Of the $125 million Trump and the Republican National Committee raised in the third quarter, $45 million came through online formats — a 29% increase from the previous quarter, said Trump campaign spokeswoman Kayleigh McEnany. The campaign also had 300,000 first-time online donors this quarter.

Robert Zimmerman, a Democratic National Committee member from New York and fundraiser, dared Trump to continue spending more campaign cash in his home state.

“Let him spend it all. It will just mobilize Democrats and mobilize New Yorkers of all backgrounds,” said Zimmerman, who bashed Trump for limiting the popular deduction for state and local taxes. “I’m looking forward to it. He’s been the greatest adversary to New York since King George!”