FWIW, I think that Debian's "popularity contest" banner is a good example of an "active choice" approach to getting consent for anonymous on-device analytics.
Clear, instructions on how to stop it, no pressure or dark patterns, and equally prominent choices for "yes" and "no" with a default selection of "no" so that if you install by just hitting "enter" repeatedly, you select "no".