Indeed, the main problem is that we've decided to legalize spyware and are now trying to contain the damage of that decision by playing whack-a-mole and trying to plug all the holes downstream.
Making spyware illegal (whether it's for ad targeting, or analytics, or "improving your experience") and enforcing CFAA-like penalties on company executives that knowingly violate the law would fix this problem overnight and for good.