The CNBC All-America Survey shows President Donald Trump's economic agenda polling well — until he actually acts on it.

The survey of 804 Americans, conducted April 3-6, before the Syrian airstrikes, shows strong support for his plans to rebuild the nation's infrastructure, cut individual taxes and renegotiate trade deals. But the poll, with a margin of error of plus or minus 3.5 percentage points, shows majorities disapprove of his agenda in places where he's actually taken action: climate change, the immigration ban, and repealing and replacing Obamacare.

"Things [poll] a lot better before he touches it," said Micah Roberts, the Republican pollster on the survey with Public Opinion Strategies. Jay Campbell from Hart Research served as the Democratic pollster.

The survey shows another important split. Just 39 percent of the public approve of how he's doing his job, 48 percent disapprove and 13 percent say they don't know or are unsure. President Trump enjoys overwhelming approval from Republicans, but Democrats overwhelmingly disapprove of his job so far. Only 34 percent of independents approve of the job Trump is doing, while 46 percent disapprove.

Indeed, despite the president's low approval ratings, the survey is recording some of the highest levels of economic optimism in its decadelong existence: 38 percent of the public say the economy is good or excellent, up 4 points from December and a record for the survey.

Forty percent expect the economy to improve in the next year, close to the record. Of those who believe the economy will improve, 67 percent say it's because of Trump's policies. And the 47 percent of Americans who say now is a good time to invest in stocks represents the most bullish sentiment in the country since 2007. The president's handling of the economy is seen favorably, with 44 percent approving and 41 percent disapproving.

"It's a positive picture for the administration when focused on the economy," said Roberts. "The survey suggests a new era of optimism."

But Campbell believes the survey is more worrisome for the administration. "If you look under the hood things are more precarious," he said. "Nearly all of those superlative numbers are borne aloft by extraordinary Republican optimism. This can give a false sense that everything looks great, when in fact the majority of the public (Democrats and independents) are very leery."

The survey provides a blueprint of how Trump, if he's looking to form a consensus, should prioritize his agenda. Thirty-four percent of those surveyed said "keeping U.S. jobs from going overseas" is one of their top two issues. Individual tax cuts, funding infrastructure and reducing the deficit followed as the next-highest priorities. Cutting business regulations and business taxes were near the bottom of the list — two areas the president has prioritized.

There were vast differences by party, however. The top priority for Republicans is repealing and replacing the Affordable Care Act, also known as Obamacare. It's near the bottom of the list for Democrats. Meanwhile, the top priority for Democrats, rebuilding infrastructure, is close to the bottom of the list for Republicans.

In an apparent rejection of the tactics of the House Freedom Caucus, whose hard line blocked the House health-care reform bill, Republicans want their party to compromise to enact Trump's agenda. By a 51-to-33 majority, Republicans surveyed said they want their party to "work to pass Trump's agenda" rather than "hold the line on conservative positions." Democrats are divided, 41 to 40, on whether their party should compromise with the president.

Meanwhile, Americans are deeply divided over the benefit of free trade to the U.S., with 34 percent saying it helps the country and 31 percent saying it hurts. That's a sharp drop from the February NBC/Wall Street Journal poll, when 43 percent expressed support for trade.

Divisions on trade cut across nearly every demographic line: North vs. South, old vs. young and poor vs. rich. For example, just 24 percent of those with incomes under $30,000 believe free trade helps the U.S., compared with 39 percent of those with incomes of $100,000 or greater.

But by a 58 percent to 26 percent margin, Americans support Trump's efforts to renegotiate trade deals. That includes greater percentages of those who think trade helps the U.S., suggesting that they may support free trade but are not opposed to efforts by the president to cut a better deal.

About CNBC:

With CNBC in the U.S., CNBC in Asia Pacific, CNBC in Europe, Middle East and Africa, and CNBC World, CNBC is the recognized world leader in business news and provides real-time financial market coverage and business information to more than 385 million homes worldwide, including more than 94 million households in the United States and Canada. CNBC also provides daily business updates to 400 million households across China. The network's 15 live hours a day of business programming in North America (weekdays from 4:00 a.m. - 7:00 p.m. ET) is produced at CNBC's global headquarters in Englewood Cliffs, N.J., and includes reports from CNBC News bureaus worldwide. CNBC at night features a mix of new reality programming, CNBC's highly successful series produced exclusively for CNBC and a number of distinctive in-house documentaries.

CNBC also has a vast portfolio of digital products which deliver real-time financial market news and information across a variety of platforms including: CNBC.com; CNBC PRO, the premium, integrated desktop/mobile service that provides live access to CNBC programming, exclusive video content and global market data and analysis; a suite of CNBC mobile products including the CNBC Apps for iOS, Android and Windows devices; and additional products such as the CNBC App for the Apple Watch and Apple TV.