Almost all websites have analytics these days. Agreed, it should be disclosed but making it opt-in would render analytics useless as less than 1% people would agree to it. Most analytics is not even a privacy issue as clickthroughs and bounce rates do not carry any personal fingerprints.
i consider my IP address a personal detail as well as all the browser information that gets used as a fingerprint. The web would be a nicer place without all the analytics, I miss the 90s.
> My opinion: ...and it should be both disclosed and opt-in.
And, perhaps, avoided completely–once your shop has resources to spare for in-house testing and usability research.