Advertising revenue from in-game NFL programming declined 1.2% to $2.42 billion during the 2017 regular season, according to Standard Media Index, as the league feels the impact of declining viewership.

SMI’s figures include NFL advertising across NBC, CBS, FOX and ESPN, from Sept. 7 to Dec. 31.

The price of 30-second spots increased 1.2% from $499,000 to $505,000, according to SMI. At the same time, the delivery of “make goods” grew from 21% to 23% of the units due to lower ratings. Media companies typically give advertisers make goods, or extra commercial space, when they don’t hit their agreed-upon audience or ratings targets.

“For the first time since we have been tracking the market we saw a slight drop of in-game dollars,” said SMI Chief Executive James Fennessy in a statement. “Despite a fairly significant fall in ratings, CPM’s were strong and demand continued to be high.”

According to SMI, NFL ad revenue was up 9.6% in 2015, and 3% in 2016.

Viewership of NFL games was down 9.7% compared with the 2016 regular season, according to Nielsen. Industry insiders have chalked up the ratings woes to a range of possible factors, from off-the-field controversies and backlash to players’ protests during the national anthem to there being too much football on TV. Many believe cord-cutting has led to a structural and long-term downshift in viewing.

The NFL is still attractive real estate for advertisers. The cost of NFL commercial space increased about 6% to 7% this year in the “upfront” marketplace, the spring bazaar when the lion’s share of ad space is sold, according to media buyers.

But the early pricing didn’t translate into overall revenue growth by the end of the year. Much of the NFL’s inventory is bought in the so-called scatter market throughout the season. The NFL’s ability to deliver the audience it guaranteed in those early deals is also a key factor.

According to the latest SMI data, the NFL was hit by declines from the league’s top advertisers. Automotive and consumer electronics advertisers, which represent the biggest NFL spenders by category, both cut back in 2017. Autos were down 5.4% and consumer electronics were down 3%.

On the other hand, industries that make up less of the NFL’s total ad revenue increased their total ad spending in the season. Insurance was up 30%, alcoholic beverages 16% and quick-serve restaurants 6.4%.

Write to Alexandra Bruell at alexandra.bruell@wsj.com