I would rather have standard browser or web server attributes to opt out of analytics (google and others) and other annoying crap.
That would have been much more efficient than those GDPR banners and dialogs, but will never happen since it will be "too easy" to opt out just like the http "do not track" extension failed for being too powerful.