This! Exactly this!
Advertising also stimulates mass overconsumption.
If we want to save the planet, advertising is among the top things we should ban right away.
Separately, yes, I'd like to see practically all public advertising banned (billboards are blight), and while I'd have to think on it some more before supporting a blanket ban on all advertising (I'm not sure it's workable, for one thing) I'd also not be sad if I woke up one morning and learned that such a law had been passed.
Advertising causes a great deal of surveillance, but it causes a lot of other issues, many of which affect almost everyone, very directly, and in some tangible ways. At a basic level, we're being lied to constantly in ways that hurt our self esteem, break our concentration, introduce us to new fears and angers: the exact intention of which is to create problems for us so that it can persuade us that giving them money will solve our problems. Advertising tells us our partners aren't hot enough, we aren't cool enough, our houses aren't big enough, our cars aren't fast enough, that we aren't doing enough for X cause. It tells us that our financial future is insecure, that we're missing out, that we're at risk for disease, floods, and car accidents. If a parent or partner told us these things, we'd call it emotional abuse, but from advertisers it's both accepted and commonplace. And it affects us deeply: we're overmedicated, overfed, overworked, and over-indebted.
And that's just the direct effects. When you consider the kinds of content that advertising funds, it's almost universally harmful. News that prioritizes clicks over information by inciting anger and fear. Informational resources that avoid speaking truth to power because power advertises. Social media that courts flame wars, conspiracy theories, and echo chambers because they all provoke engagement. Everything advertising funds is fast, shallow and emotional, because slow, deep and rational doesn't promote clicks.
Why even look for a compromise here? Easy to spot ads aren't better: they're still people shoving a lie in our face. There's nothing of value here. Ads are a tumor: even if we can find some part of it that's benign, there's no part that shouldn't be excised.
Also, they distort the free market (not the best product wins, but the one with the biggest advertising budget)
And they often target young children.
The only reason ads exist is because countries measure the success of their economies by how much is consumed.
If I were writing the rules, I'd exclude anything that looks routing-like. "IP address A sees version 1, IP address B sees version 2, with some amount of ephemeral data involved to support pinning" is fine. Basic hit-counter type stats are fine. (though I think A/B tests are abusive crap and would love to see them go away, on a personal level, I don't think they necessarily qualify as spying, though the way they're practiced right now probably does tend collect & retain enough information that they absolutely are, but might not with some modification)
> Show you products that they think you will want to buy based on your purchase history?
No. Maybe with some kind of opt-in or otherwise making that something the user has to intentionally ask for. But if you're not using others' purchasing data to decide what those might be (and that would definitely be off-limits) then that's not very different from just having categories your users can browse.
[EDIT] FWIW I don't think these kinds of rules should only apply to tech companies. Physical stores ("loyalty" cards, tracking shoppers' cell phones, that stuff) and banks and similar also shouldn't be able to spy on people, nor to sell or otherwise use data collected as a necessary part of their business against people. A store may reasonably have surveillance cameras, but ought not be able to sell the footage to another company to train & test its gait-recognition software, nor use facial recognition to track how often I visit the store or what I look at. That kind of thing.
I'm not sure many customers will miss it, if they really notice. Yes it can be a bit helpful, but many other things in the world would be "a bit helpful" and yet are nowhere near justifying their cost and effect (e.g. we stopped using radioactive chemicals in substantial amounts for everyday products very, very quickly).
(On the other hand, I think the law as you're proposing it would cover them)
Ban monetizing data (no selling, no pay-for-access, no derived products) and make leaks guaranteed to be expensive, so companies only keep what they have to to operate, with some large multiplier attached to the leak fine if it was related to banned activities.
Done.
The advertising is a symptom, it's not the disease.