chat-analytics icon indicating copy to clipboard operation
chat-analytics copied to clipboard

Options to disable analytics

Open larueli opened this issue 2 years ago • 6 comments

Hello !

In https://github.com/mlomb/chat-analytics/blob/main/assets/Plausible.ts, if we run this app self hosted, there are still data sent to your servers without any "proper" way to disable it entirely.

If you agree I can open a PR adding an env variable to disable (default enabled) analytics report.

Waiting for your green light or remarks.

larueli avatar Apr 06 '23 18:04 larueli

I think its better to have a flag in the CLI to disable this, that sets an option in the Config object, later read by Plausible.ts

https://github.com/mlomb/chat-analytics/blob/452037f2ada3cff2fc656dc75a2938d4e3324094/lib/CLI.ts#L59

What do you think?

mlomb avatar Apr 06 '23 20:04 mlomb

Maybe I don't understand everything but actually my current workflow to use your app is to install the dependencies, build the web version and serve it through a simple web server (all this with docker). How would you do to expose this app ? Run node web server with cli args without building ?

larueli avatar Apr 06 '23 20:04 larueli

The web app of Chat Analytics is built with npm run build:web and then the folder dist_web is served statically (see BUILDING.md). If someone wants to disable analytics, they should use the CLI with an option like --disabe-analytics (does not exists right now). The web app is meant for the online app, for custom behaviour we should use the CLI.

mlomb avatar Apr 07 '23 16:04 mlomb

I think custom behaviour should still be available for the app. Primarily because the app is much more intuitive and accessible than the CLI

hopperelec avatar Apr 08 '23 02:04 hopperelec

We can include this option when we (eventually) implement report configuration in the web app

mlomb avatar Apr 13 '23 22:04 mlomb

Just realised- this isn't a report-specific option, in fact iirc report pages don't have analytics anymore, so it is specifically for the site as a whole. So I don't think this needs to wait on report configuration

hopperelec avatar Oct 24 '23 01:10 hopperelec