=== ClickHouse Analytics by Volade ===
Contributors: volade
Tags: analytics, clickhouse, realtime, sql, tracking
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later

Run ClickHouse HTTP queries from wp-admin — optional WP event INSERT, 4 presets and free JSON export.

== Description ==

ClickHouse Analytics by Volade connects WordPress to your ClickHouse cluster via the HTTP interface for read-only dashboards and optional event ingest.

* Host URL, database, user and masked password — override via `CHA_USER`, `CHA_PASSWORD` or `CLICKHOUSE_PASSWORD` in wp-config.php (no secrets in repo)
* HTTP client — `wp_remote_post` with Basic auth and `database` + `query` body
* Admin dashboard — connection test, SELECT query runner (safety blocks writes/mutations by default), result table
* Tracker lite — `do_action( 'cha_track', $event, $props )` inserts into your events table when enabled
* 4 presets: Realtime Dashboard, Event Ingest, Agency Report, Privacy Minimal
* Site Health test, REST `cha/v1`, WP-CLI `wp cha`, free JSON export

Works without a Volade account. Connect for REST automation.

== Installation ==

1. Upload the ZIP via Plugins → Add New → Upload
2. Activate ClickHouse Analytics by Volade
3. Set host URL (e.g. https://host:8443), database, user and password
4. Run connection test, then run your default SELECT or enable event insert

Optional in wp-config.php:

`define( 'CHA_USER', 'default' );`
`define( 'CHA_PASSWORD', 'your-password' );`

== Frequently Asked Questions ==

= How do I track custom events from PHP? =

`do_action( 'cha_track', 'my_event', array( 'foo' => 'bar' ) );`

Enable event insert in settings or apply the Event Ingest preset.

= What does Privacy Minimal do? =

Disables auto page views, enables Do Not Track respect, keeps manual events via `cha_track` only.

== Changelog ==

= 1.0.0 =
* Initial release — settings, HTTP queries, event insert lite, presets, export, REST and WP-CLI.
