“The Nielsen ratings just came out,” Donald J. Trump, the Republican presidential nominee, said with a smile on Friday in Colorado, hours after his Democratic opponent, Hillary Clinton, delivered her climactic convention speech. “We beat her by millions.”

Well, yes and no.

Mr. Trump did deserve some bragging rights: His fiery convention address in Cleveland edged Mrs. Clinton’s remarks in Philadelphia by about 2.4 million viewers, according to cable and broadcast ratings released by Nielsen on Friday. About 29.8 million Americans watched Mrs. Clinton Thursday night; a week before, 32.2 million tuned in to Mr. Trump.

But over all, Mr. Trump’s side came up short. The Democratic convention this week beat its Republican counterpart on three out of four nights, thanks in part to memorable prime-time speeches by President Obama, Michelle Obama and former President Bill Clinton — not to mention a song by the pop star Demi Lovato.

Presidents, it turns out, may be bigger draws than sitcom stars like Scott Baio, one of Mr. Trump’s featured speakers. On average, 26.2 million viewers watched the Democrats each night, compared to 24.6 million for the Republicans, Nielsen said.