With the click of a button and a tweet seen by millions, President Donald Trump says his endorsement can resurrect foundering political careers and launch political rookies into stardom.

“I don’t want to brag about it, but man, do I have a good record of endorsement,” Trump declared at a campaign rally in West Virginia this month.

Most of his endorsements have come on Twitter. An ABC News analysis found Trump has tweeted support for 28 candidates in House, Senate and gubernatorial primaries and special elections so far this year. Of those, only two have lost their races -- GOP congressional candidate Rick Saccone of Pennsylvania and gubernatorial candidate Foster Friess of Wyoming.

“In Florida, we have a great candidate -- his name is Ron DeSantis -- and he called me, and asked whether or not I could endorse him… And I gave him a nice shot, a little tweet -- bing, bing!” Trump said in West Virginia, “and he went from 3 to like 20-something” in the polls.

DeSantis, the Florida GOP congressman who had trailed state Agriculture Commissioner Adam Putnam by double-digits early in the race and before Trump’s tweet, clinched the Republican gubernatorial nomination in Florida on Tuesday. He defeated Putnam 56.5 percent to 36.5 percent, according to the Florida Department of State.

"I'm not always the most popular guy in DC, but I did have support from someone in Washington," DeSantis said in his victory speech Tuesday night. "If you walk down Pennsylvania Avenue, he lives in the White House with the pillars in front of it."

Presidential endorsements in midterm primaries are not a new phenomenon. But Trump has endorsed in more primary races than any of his recent predecessors, wielding notable influence through the use of his Twitter account.

"Trump’s Twitter feed gets so much attention, probably an inordinate amount, that it helps candidates more than a formal press release or a rally blessing," said political analyst Larry Sabato, director of the University of Virginia Center for Politics.

Rep. Kevin Cramer, R-N.D., said the president's June tweet endorsing his U.S. Senate bid had an immediate, measurable impact. “The ‘uptick’ in followers was more like a sustained bounce which definitely led to many new donors, small and large,” Cramer told ABC News.

DeSantis, Rep. Matt Gaetz, R-Fla., and GOP governors Rick Scott of Florida and Doug Ducey of Arizona all won their primaries Tuesday -- and all were endorsed by Trump on Twitter, even if most didn't need the help to win.

“The results in Florida reaffirmed what has been seen all year - the president’s endorsement matters, and matters a lot. From start to finish, the president’s support swung Florida’s gubernatorial primary 40 points in the direction of his endorsed candidate,” White House political director Bill Stepien told ABC News.

Trump has used Twitter more aggressively than any other president, tweeting more than 4,500 times to his more than 54 million followers. Dozens of tweets have been directly regarding the 2018 midterm elections.

By comparison, President Obama tweeted from his @BarackObama account just 101 times about the 2010 midterm elections. Notably, he did not directly endorse any candidates on Twitter during the primaries or general election. Obama’s sole endorsement on Twitter was for Democrat Martha Coakley in the special election against Republican Scott Brown to fill the U.S. Senate seat vacated by the late Sen. Ted Kennedy.

“No question Trump has helped the candidates he has endorsed by adding votes and money. After all, Trump has nearly 90 percent support among Republicans, and a great deal of it is intense backing,” said Sabato.

It's unclear whether Trump’s involvement in a few dozen primary races will translate to Republicans retaining majority control of the House and Senate in November. The latest midterm forecast from FiveThirtyEight has Republicans with just a 1-in-4 chance of keeping their majority in the U.S. House.

“You can have Donald Trump endorse a candidate in Arkansas and Alabama," one former top Republican House moderate, who left Congress earlier this year and has been quietly advising former colleagues, told ABC News. "But people like that shouldn’t need help at all.”

Sabato likened Trump to "poison" for Republicans in many competitive, suburban districts. "Our research shows clearly that the foremost motivator for Democratic turnout this year is Donald Trump. To be blunt, Democratic voters hate him and are determined to build more of a check on the president by helping Democrats take the House.”

How Trump decides to tweet endorsements

Overall, Trump has made 54 endorsements since taking office, according to records compiled by the website Ballotpedia and analyzed by ABC News. Most of those have come on Twitter during primary season, setting a level of involvement that is atypical for an sitting president.

"Most presidents don't get heavily involved in primaries, with the exception of endorsing incumbents, which is common," said Brendan Doherty, a political scientist at the U.S. Naval Academy and author of "The Rise of the President's Permanent Campaign."

After decades of running his family businesses, sources close to the president say his political king-making has been primarily guided by his personal chemistry with candidates, in addition to political considerations. While it's often not Trump physically sending out the tweets himself, sources say the tweet endorsements are often dictated by the president or vetted and approved by him beforehand.

Senior political aides, in weekly meetings with Trump, offer their recommendations on which GOP candidates and races he should get involved, according to sources familiar with the process. They say the president then decides which candidates to support based on who is “going to best serve him and his agenda.”

“The qualifications for endorsement: which candidate has been the most consistent supporter of his agenda? Secondly, who can best carry the president's message in a campaign? Thirdly, who can win the race? And lastly, who will be the best legislative partner while here,” Stepien said.

“I'll note that the process by which the president arrives at those conclusions is very methodical, very systematic,” he said.

In June, on his flight home from Singapore after a summit with North Korea's Kim Jong Un, Trump thrust himself into the South Carolina GOP primary, endorsing Katie Arrington's challenge to incumbent GOP congressman Mark Sanford. "Mark Sanford has been very unhelpful to me in my campaign to MAGA," Trump tweeted as voters were still heading to the polls. "VOTE Katie!"

The stinging rebuke from Trump was widely seen as helping sink Sanford's reelection and first electoral loss in more than 20 years.

Just six Trump-endorsed candidates have lost their primaries or special elections, while 48 have won their races and nominations.

During the 2017 special election in Alabama, both Republican candidates Trump endorsed in the primary and general elections to replace Senator-turned-Attorney General Jeff Sessions were unsuccessful.

Trump backed then-Sen. Luther Strange in the GOP Senate primary; Strange lost to Judge Roy Moore. The president then endorsed and campaigned for Moore -- who faced multiple allegations of sexual misconduct and eventually lost the special election to Democrat Doug Jones in a major embarrassment to the White House.

Strange, reflecting on the president’s support, told ABC News the president’s endorsement tweet -- which the two drafted together during a phone call -- was “very helpful” if too late.

“It probably would have made all the difference in warding off my challengers had I reached out to him earlier and asked for it,” Strange said. “The dynamics were unique in my special election situation and complicated by [former White House chief strategist] Steve Bannon and a bunch of groups who were more focused on sending a message to McConnell & the ‘establishment’ than in winning the seat.”

In Pennsylvania, state representative Rick Saccone lost a special election for a U.S. House seat after a full embrace from Trump. Two months later, he lost in the GOP primary for another seat.

Republicans “assume that all these people voted for Trump because they love him," said the former Republican member. "Some of them voted for Trump because they hated Hillary."

Maria Elvira Salazar, a former journalist who won the GOP primary Tuesday to succeed retiring Florida GOP Rep. Ileana Ros-Lehtinen in a district carried by Hillary Clinton in 2016, suggested she wouldn’t want President Trump to tweet about her -- or campaign with her.

“We have to think about it,” she told ABC News, “but the reality is that we are not winning here. Victory has been given to me by the members of this community, and we have independents, we have Democrats, we have Republicans, and apparently the Republicans thought I was the best fit,” she said.

History may hold some lessons for the present, noted Doherty, the Naval Academy political scientist. "The object lesson is Franklin Roosevelt in 1938, when, in the wake of his landslide reelection in 1936, he decided to intervene in Democratic primaries and advocate for the defeat of Democratic incumbents who had not been sufficiently supportive of his New Deal agenda," he said. "Roosevelt's efforts were unsuccessful in every race except one, and the ill will he caused contributed to difficult relations with his fellow Democrats in Congress after the 1938 elections."

At the end of the day, Republicans see more reward than risk in President Trump's involvement. He plans to travel for campaign events more than 40 days between August 1 and November 6, according to administration officials -- a schedule that would outpace recent predecessors.

"I think it’s always a good thing to be endorsed by the leader of your party," said National Republican Campaign Committee spokesman Matt Gorman. "President Trump has been tremendously helpful in holding our majority. He can be used in almost every district in the country."

That majority -- even the president concedes -- is now very much in the balance.

ABC News’ Michael Pyskaty and Dennis Powell contributed reporting.