Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@openpanel/plausible-exporter

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openpanel/plausible-exporter

Barebones ClickHouse CSV exporter for Plausible events.

latest
Source
npmnpm
Version
0.7.0
Version published
Maintainers
1
Created
Source

@openpanel/plausible-exporter

Export your Plausible ClickHouse data to a CSV which you can use for migrating to OpenPanel.dev.

Install / Run

Use npx with a ClickHouse URL:

npx @openpanel/plausible-exporter "http://localhost:8123/plausible_events_db" --output export.csv --job-id 00000000-0000-0000-0000-000000000000

Filter by site_id:

npx @openpanel/plausible-exporter "http://localhost:8123/plausible_events_db" --site-id 2 --output export.csv

Or via env vars:

export DATABASE_URL="http://localhost:8123/plausible_events_db"
export OUTPUT=export.csv
export JOB_ID=00000000-0000-0000-0000-000000000000
export SITE_ID=2  # optional
npx @openpanel/plausible-exporter

Output format

Header and column order:

"timestamp","name","site_id","user_id","session_id","hostname","pathname","referrer","referrer_source","country_code","country_name","screen_size","operating_system","browser","utm_medium","utm_source","utm_campaign","utm_content","utm_term","browser_version","operating_system_version","subdivision1_code","subdivision1_name","subdivision2_code","city_geoname_id","city_name","revenue_reporting_amount","revenue_reporting_currency","revenue_source_amount","revenue_source_currency","channel","meta.key","meta.value","job_id"

  • All values are quoted and escaped per RFC4180 CSV format.
  • Null values are rendered as empty fields.
  • timestamp is the event timestamp from events_v2.timestamp.
  • country_name, subdivision1_name, and city_name come from JOINs with location_data table.
  • meta.key and meta.value are JSON stringified arrays from events_v2.meta.key and events_v2.meta.value.
  • job_id is a constant per run (env/flag), appended to each row.

Flags

  • --output, -o Output file path (default: export.csv)
  • --job-id Job id to append to each row (default: empty string)
  • --site-id Filter by site_id (optional, exports all sites if not specified)
  • --batch-size Number of rows per paginated query (default: 50000)

Notes

This package needs access to your ClickHouse database. The connection string format is:

http://[username:password@]host:port/database

Examples:

  • http://localhost:8123/plausible_events_db
  • http://user:password@clickhouse.example.com:8123/plausible_events_db

The exporter queries the events_v2 table and joins with location_data to include country, region, and city names. It does not include imported data tables.

Ensure you have correct credentials and that the ClickHouse server is accessible from your network.

Keywords

plausible

FAQs

Package last updated on 05 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts