mlomb / chat-analytics

Generate interactive, beautiful and insightful chat analysis reports
https://chatanalytics.app
GNU Affero General Public License v3.0
711 stars 51 forks source link

Options to disable analytics #74

Open larueli opened 1 year ago

larueli commented 1 year ago

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.

mlomb commented 1 year ago

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?

larueli commented 1 year ago

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 ?

mlomb commented 1 year ago

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.

hopperelec commented 1 year ago

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

mlomb commented 1 year ago

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

hopperelec commented 1 year ago

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

satonotdead commented 2 weeks ago

Chat-analytics stills without a way to disable analytics?