I've had telemetry (as opposed to analytics) in my Contentment package for the past few years. It hooks into the DataType save event, as I only wanted to capture specific data (e.g. which property-editors were being configured and how), so I can be informed on where to focus my future development efforts - yup, things I thought would be super popular turned out to be less so (and vice-versa).
I went with opt-out, as my gut feeling would that very few would opt-in for telemetry... so would have been a pointless exercise. I do try to make the opt-out methods as visible as possible.
I publish the collected data on my website, again trying to be an transparent with it as possible:
https://leekelleher.com/umbraco/contentment/telemetry/