# Move from Plausible to Checkend

> Import the raw events of Plausible Community Edition, replace the script, and see what continues to work.

## Import your history

> **Caution**
> Checkend imports only the raw events of Plausible Community Edition, the self-hosted edition: the ClickHouse table `events_v2`, as a `.parquet` or `.csv` file. The hosted Plausible service [exports CSV files of stats](https://plausible.io/docs/export-stats), not this table. Checkend cannot import these CSV files. Keep your Plausible account for as long as you need that data.

### Export the events from Plausible Community Edition

Run this command on the Plausible server, in the folder of its Docker Compose file:

```sh
docker compose exec -T plausible_events_db clickhouse-client --database plausible_events_db --query "
  SELECT name, site_id, user_id, session_id, hostname, pathname, referrer, referrer_source,
         utm_medium, utm_source, utm_campaign, utm_content, utm_term, country_code, screen_size,
         operating_system, browser, timestamp, meta.key AS meta_key, meta.value AS meta_value
  FROM events_v2 FORMAT Parquet" > events.parquet
```

For a CSV file, use `FORMAT CSVWithNames` and `events.csv`. The CSV file is larger.

### Import the file into Checkend

> **Caution**
> The events of the file replace all events of the site in the time range of the file. This includes events that the Checkend script recorded in that range. If both scripts ran on the same days, the Checkend events of these days are deleted.

1. Add the site in Checkend.
2. Open **Settings**, then **Data**.
3. In **Import from Plausible**, choose the site and the file.
4. Click **Import**.

The import runs in the background. Its status shows below the form. The file can be up to 5 GB. Only owners can import.

All Plausible sites in the file go into the site that you choose. Plausible goals are not imported, because Checkend shows each event without a goal. The properties of the events are imported.

## Replace the script

1. Replace the Plausible script tag with the Checkend snippet.
2. Deploy your site.

## What continues to work

- Calls to `window.plausible('Name', { props: { … } })`.
- The body format of `POST /api/event`, with the keys `n`, `u`, `d`, `r` and `p`.
- The browser setting `plausible_ignore`.

## What is different

- There are no goals. Each event shows when it arrives.
- Other extensions of the Plausible script are not part of Checkend, for example file downloads and form submissions. Send them as custom events.
