Who won the convention ratings race, Donald Trump or Hillary Clinton?

Trump, by a margin of 2.4 million viewers, according to Nielsen, the TV ratings firm.

Clinton's Thursday night acceptance speech at the DNC averaged 29.8 million viewers across ten broadcast and cable channels.

Trump's speech at the RNC one week earlier averaged 32.2 million viewers across the same channels.

Nielsen's totals did not include PBS. With the public broadcaster's coverage added, Trump's speech had 34.9 million viewers and Clinton had 33.8 million, a difference of 900,000.

For Trump, the victory is even sweeter because while the first three nights of the Democratic convention out-rated the same nights of the Republican convention, his speech spurred more live viewership than Clinton's on the fourth night.

"We beat her by millions," Trump said at a Friday afternoon rally.

When asked about the ratings for Clinton's speech, Trump communications director Jason Miller quipped, "That's the downside in running for Obama's third term -- nobody watches repeats in the summer."

The ten channels included here are CNN, Fox News, MSNBC, NBC, ABC, CBS, Univision, CNBC, Fox Business, and NBC Universo.

Nielsen's total does not incorporate live streaming views or web video clips that are viewed later.

YouTube said that its official live stream of the conventions peaked with 250,000 simultaneous viewers during Clinton's speech versus 217,000 simultaneous viewers during Trump's speech.

Dozens of other live streams were also available. But the vast majority of convention viewing still happens the traditional way -- live, on TV sets, through channels like CNN and NBC.

CNN was by far the highest-rated channel on Thursday, averaging 7.5 million viewers during Clinton's speech. MSNBC was #2 with 5.3 million viewers. NBC was #3 with 4.5 million.

Related: Hillary Clinton's acceptance speech capped the DNC's star-studded miniseries

While Trump's speech was slightly higher-rated on TV, the results were reversed on Facebook, which measured the volume of conversation about each convention.

Facebook said the final day of the DNC generated "46.5 million likes, posts, comments and shares" from 12.6 million American users, slightly ahead of the final day of the RNC, when the site had 45.1 million interactions from 12.2 million users.

Trump, a former reality TV star, is a student of both social media and TV ratings; he frequently comments on his attention-grabbing abilities.

That's why some of Trump's critics celebrated when the Democrats' gathering in Philadelphia turned out to be higher-rated than the Republican convention in Cleveland through Wednesday.

Monday night's DNC speeches were seen by 26 million viewers across seven channels, versus 23 million for night one of the RNC.

Tuesday night's DNC coverage averaged 24 million, versus 19 million for night two of the RNC.

And Wednesday night attracted 24.4 million viewers, versus 23.4 million viewers for the RNC.

Thursday was the highest-rated night of the week for both parties, but Trump had bigger gains, giving him the bragging rights at the end of the convention period.

Nielsen's total for Clinton's speech, 29.8 million, does not include the noncommercial networks C-SPAN and PBS.

C-SPAN is not rated.

PBS said it averaged 3.98 million viewers during the 10 p.m. hour on Thursday, when Clinton's speech began, and 2.75 million viewers during the same hour last week.