It’s one of prime time’s biggest mysteries: Why does afterlife sitcom “The Good Place” keep getting renewed — despite dismal weekly ratings?

NBC recently rewarded the series — starring Kristen Bell and Ted Danson — with a fourth season, a head-scratcher given that “The Good Place” averages less than 3 million viewers per week.

But there’s more to the story, and this reveals how the TV landscape is changing.

“What you guys see are primarily the Nielsen numbers, and as a live show, ‘The Good Place’ is pretty low-rated,” says an industry source. “But [the numbers] move up for each week that you look at [‘The Good Place’]. It’s one of [the network’s] top shows on the digital side.”

“The Good Place” is actually one of NBC’s highest-rated shows, averaging around 10 million viewers each week once viewership from other platforms is factored in. That puts it on par with the network’s hit competition show “The Voice,” which averages between 8 and 10 million viewers each week.

That means, on average, that 6 million viewers each week are watching “The Good Place” not in its regular time slot — Thursdays at 9:30 p.m. — but via delayed viewership (NBC’s digital platforms, DVRs and on Hulu). In other words, the show’s fans are watching it when they want to watch it.

Welcome to television viewing in the digital age.

It also helps that “The Good Place” is a critical darling that’s also popular at awards time, snaring several Emmy and Golden Globes nominations. This year alone, it’s nominated for two Golden Globes (airing Jan. 6 on NBC): one for “Best Television Series — Musical or Comedy” and one for Bell as “Best Actress in a Musical or Comedy Series.”

Surely that prestige factor also contributes to its longevity, right?

Well, not exactly.

“We would put awards and social media buzz as really positive things — but they would really only impact a renewal decision [if] the social buzz or [awards] honor got more people to tune in or discover the show,” says another industry source.

“Ultimately, the primary thing we’re looking at it when it comes to renewal is cross-platform viewership over time — as well as the growth potential.”

That explains why NBC grabbed Andy Samberg’s cop sitcom “Brooklyn Nine-Nine” after it was cancelled by Fox: It’s shown a similar pattern of low “live” viewership but healthy increases in eyeballs on digital platforms.

This doesn’t mean that “Appointment TV” is over, since that still exists for several shows, including “This Is Us” (NBC), “Game of Thrones” (HBO) and “Stranger Things” (Netflix). But as the TV landscape becomes more crowded — this year alone saw almost 500 scripted shows — audience viewing patterns are evolving.

“It used to be so easy to measure [a show’s ratings], because it was one data stream and one day,” says an industry source. “Now it’s multiple days and multiple platforms. [‘The Good Place’] is a show that’s very emblematic of what our business is turning into.”