lbryio / lbry-desktop

A browser and wallet for LBRY, the decentralized, user-controlled content marketplace.
https://lbry.tech
MIT License
3.56k stars 414 forks source link

Disable Matomo tracking if MATOMO_URL is unset #7395

Open melroy89 opened 2 years ago

melroy89 commented 2 years ago

Is your feature request related to a problem? Please describe.

MATOMO_URL & MATOMO_ID are two settings for LBRY Desktop. This will allow you to set & enable Matomo Analytics.

And used here: https://github.com/lbryio/lbry-desktop/blob/master/ui/analytics.js

Describe the solution you'd like

If you not set the MATOMO_URL variable. I expect that the app is not enabling analytics. So the app should work fine without Matomo.

What is actually happening

Matomo is always enabled and is not checking the MATOMO_URL at all.

App is not working:

image image

melroy89 commented 2 years ago

Ps. you can also see it as a bug actually instead of a feature. Since I suspect the code to be robust for such settings.

melroy89 commented 2 years ago

@jessopb I think you can just disable creating a MatomoInstance in ui/analytics.js, when the URL is not set?