www.kanzenshuu.com
So, DB started with very high ratings. It was riding the popularity of the
Dr. Slump anime, which had just ended. Ratings declined slightly during the Jackie Chun arc but picked right back up during the Red Ribbon arc, reaching an all-time high with episode 47 (when Goku brought Krillin and Bulma along with him on his quest for the Dragon Balls), which got a viewership score of 29.5%. Then, they began to decline during the Baba mini-arc and they never picked up for the rest of the original DB's run, reaching an all-time low with episode 110 (when the Turtle Hermit was about to fight Demon King Piccolo), which got a viewership score of 13.7%. The final episode to get a viewership score of at least 25% was episode 75 (when Goku started fighting Grandpa Gohan).
www.kanzenshuu.com
DBZ didn't start with impressive ratings. It wasn't until toward the end of the Saiyan arc that it could nail a viewership score of at least 20% and it wasn't until about midway through the Namek/Freeza arc that it could get a viewership score of at least 25%. Ratings noticeably increased right about when Gohan grew up and the opening switched to "We Gotta Power", reaching an all-time high of 27.5% with episode 219 (when Gohan prepared to transform for Kibit). They fell off again right about when the Z Fighters entered Bobbidi's spaceship and never picked up for the rest of DBZ's run, reaching an all-time low with episode 273 (when Vegett split inside of Boo), which got a viewership score of 12.1%. The final episode to get a viewership score of at least 25% was episode 222 (when Vegeta stomped Pui Pui).
The weird thing is that in the manga, the Pilaf arc wasn't popular; it was riding on Dr. Slump's popularity in the beginning, but ratings eventually declined until the Jackie Chun arc. From there, the manga kept increasing in popularity, reaching a peak in the Freeza arc. Yet for the anime, the Freeza arc wasn't the peak at all; it was the Red Ribbon arc, with the Pilaf arc coming close. Going by the anime, I can see why Toei decided to go back to DB's roots for GT, toning down the action in favor of adventure, because the earlier episodes of the original DB had the highest ratings in Japan. But it was still ill-conceived; when ratings have declined after about a decade and the original creator has moved on, it's best to just end the franchise.
Also, DBZ's ratings dropped hard when Toriyama retconned Gohan as being significantly weaker after the 7 year time-skip and the anime series as a whole never fully recovered.
That's not a retcon lol. Gohan was already implied to be weaker right after the time-skip, as soon as Vegeta saw him again. Even after the implication, ratings were strong. Ratings declining later was just due to franchise burnout; keeping Gohan strong wouldn't have prevented this.