krtek4 / MultiPass

Automatically login to Basic Authentication using data based on URL regexp.
http://gilles.crettenand.info/MultiPass
Do What The F*ck You Want To Public License
88 stars 23 forks source link

Provide option to disable analytics #44

Closed blahjig closed 7 years ago

blahjig commented 7 years ago

It would be nice if there were an option to disable google analytics from use in the extension. I have a local edited copy with it removed, but that is a bit annoying...

krtek4 commented 7 years ago

That's a good idea, I totally understand the need for privacy regarding GA. I'll try to release something this week.

krtek4 commented 7 years ago

Hi @blahjig,

I just released version 0.7.0 on GitHub which allows for disabling GA.

Can you give it a quick test before I upload it to the Chrome and Opera stores ?

Thanks!

blahjig commented 7 years ago

Hey,fantastic... a couple of things though:

When you have loaded the extension and the google analytics option was turned on, the google analytics code gets added to the background.html, when you turn it off, the code continue to run until you restart the browser/unload+reload the extension. It might be useful to tell the user that, or if there is the possibility to reload the extension.

Second, when GA is actually not loaded, the ga() function referenced in send() is no longer defined, and causes the extension to fail to function properly. I suppose you could make a dummy ga() function that does nothing, or perhaps there is a cleaner way to do it...

krtek4 commented 7 years ago

AFAIK, it is impossible to force the reload of the extension programatically and there is also no way to "unload" the GA code. A warning to the user seems like a good option.

I did some testing and when the analytics are disabled, we redefine the send function to do nothing. I might be missing something here, but I don't see how you could have a send function requiring ga but not having the GA code loaded. Can you give me a bit more details ?

blahjig commented 7 years ago

I might have jumped to conclusions on that one, let me double check.

Also ideally, we could turn off the CSP header allowing google-analytics when the option gets switched to off, if it is possible.

krtek4 commented 7 years ago

I don't think it is possible to alter the manifest of the extension after it is loaded. I would have to double check that.

A possibility would be to distribute two versions of the extension, one with the CSP, the other without. Don't know about the policies of the Chrome store about that tho. Another possibility would be to distribute the version without the CSP only via GitHub.

What do you think ?

blahjig commented 7 years ago

You are right, actually it is functioning properly with GA disabled, I just didnt properly see my "test" entry appear because I already had a "test" entry :-P

In regards to the CSP header, it is not a big deal, although if you provided both I would use the one that did not have the google-analytics CSP header, but for such a tiny thing it doesnt make sense to maintain two versions.

I think the header is a very minor risk, I think ideally you would just decide at some point that you have collected enough stats and make it default to no analytics and remove the header.

One thing I still want to test is if any analytics gets triggered before you can reach the option to turn it off...

krtek4 commented 7 years ago

Yes, there will be, the opening of the option panel sends a tracking event.

I could default to false, or put some kind of modal dialog in place at first launch to ask the question, but that would be more work.

blahjig commented 7 years ago

Yeah, I doubt many people would care that much, and they can always unplug their network adapter, load it and uncheck the option... lol

And anyone who cares enough about tracking should probably be looking at any new software with an adversarial view.

At least for me, the check box is "good enough", :-)

Thanks for the effort and overall for the useful extension!

I think improvements on this feature probably should get their own issue, and so this is otherwise closed.

krtek4 commented 7 years ago

What I can propose you is the following, you open two new issues:

This way I can release v0.7.0 on the various stores so that and we can discuss in more details both remaining issues.

Thanks for testing :)