Skip to content

v2.0.0-rc.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@ruslandoga ruslandoga released this 08 Jun 04:34
· 1124 commits to master since this release
c559370

The highlights of this release are:

  • more visitor metrics like total visits and views per visit
  • period comparisons [docs] [example]
  • ability to change domains names #2803
  • automatic geolocation database downloads #2362
  • more email adapters support (Mailgun, Mandrill, SendGrid) #2649

Upgrading Plausible Analytics to v2.0

⚠️ ⚠️ ⚠️

Upgrading to v2.0 requires performing a data migration.
Please read these notes until the end before deploying v2.0.0-rc.2

Ensure you are using a new ClickHouse version

The steps below have been tested with clickhouse/clickhouse-server:22.6-alpine please make sure to upgrade ClickHouse to at least this version.

Here's the excerpt from v1.5 release discussion regarding the ClickHouse upgrade

In your docker-compose.yml update the image used for plausible_events_db to a newer ClickHouse version:

Upgrading ClickHouse to 22.6

plausible_events_db:
- image: yandex/clickhouse-server:21.3.2.5
+ image: clickhouse/clickhouse-server:22.6-alpine

Restart the container

$ docker compose stop plausible plausible_events_db
$ docker compose rm plausible_events_db
$ docker compose up -d

This will boot up the new version of ClickHouse.

Related PR: plausible/community-edition#45


Update image tag

In your docker-compose.yml update the image used for plausible to v2.0.0-rc.2

plausible:
- image: plausible/analytics:v1.5.1
+ image: plausible/analytics:v2.0.0-rc.2

and restart the container

$ cd hosting
$ docker compose stop plausible
$ docker compose rm plausible
$ docker compose up -d

This will boot up the new version of the app.

If you open the dashboards now, you wouldn't see any past metrics. This is expected as v2.0 uses the new events_v2 and sessions_v2 tables to store analytics data. We need to perform data migration to copy the data into the new tables.

Run data migration

⚠️ ⚠️ ⚠️

You need enough free disk space available for x2 of the current plausible_events_db's event-data volume size. You can use something like docker system df -v | grep hosting_event-data to check how much space the current volume is occupying.

Connect to the running plausible container and start the migration flow

$ cd hosting
$ docker compose exec plausible bin/plausible rpc Plausible.DataMigration.NumericIDs.run

You can attempt this migration multiple times unless you drop v1 tables.

Drop v1 tables (optional)

Once you verify the migration went well, the old tables can be dropped. It's easiest to use clickhouse-client for this

$ ch hosting
$ docker compose exec plausible_events_db clickhouse-client
:) \c plausible_events_db
:) show tables;
:) drop table events;
:) drop table sessions;

See https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#max-table-size-to-drop for how to drop tables with more than 50GB of data.

Enable automatic MaxMind GeoLite2 updates (optional)

In your plausible-config.env set MAXMIND_LICENSE_KEY environment variable and get an automatically updated GeoLite2 City geolocation database. The database edition is configurable with MAXMIND_EDITION environment variable and defaults to GeoLite2-City.

- IP_GEOLOCATION_DB=...
+ MAXMIND_LICENSE_KEY=LNpsJCCKPis6XvBP
+ MAXMIND_EDITION=GeoLite2-City

Note that for the changes in plausible-config.env to propagate to the plausible, the container needs to be recreated:

$ docker compose stop plausible
$ docker compose rm plausible
$ docker compose up -d

Also note that using GeoLite2-City edition requires more RAM than using GeoLite2-Country.

Now you can remove any other volumes and services used to download, store, and update geolocation databases.

Changelog

Following changes have been made since v1.5:

Added

  • Add support for with_imported=true in Stats API aggregate endpoint
  • Ability to use '--' instead of '=' sign in the tagged-events classnames
  • 'Last updated X seconds ago' info to 'current visitors' tooltips
  • Add support for more Bamboo adapters, i.e. Bamboo.MailgunAdapter, Bamboo.MandrillAdapter, Bamboo.SendGridAdapter #2649
  • Ability to change domain for existing site (requires numeric IDs data migration, instructions will be provided separately) UI + API (PUT /api/v1/sites)
  • Add LOG_FAILED_LOGIN_ATTEMPTS environment variable to enable failed login attempts logs #2936
  • Add MAILER_NAME environment variable support #2937
  • Add MAILGUN_BASE_URI support for Bamboo.MailgunAdapter #2935
  • Add a landing page for self-hosters #2989

Fixed

  • Fix tracker bug - call callback function even when event is ignored
  • Make goal-filtered CSV export return only unique_conversions timeseries in the 'visitors.csv' file
  • Stop treating page filter as an entry page filter
  • City report showing N/A instead of city names with imported data #2675
  • Empty values for Screen Size, OS and Browser are uniformly replaced with "(not set)"
  • Fix more pageviews with session prop filter than with no filters
  • Cascade delete sent_renewal_notifications table when user is deleted #2549
  • Show appropriate top-stat metric labels on the realtime dashboard when filtering by a goal
  • Fix breakdown API pagination when using event metrics #2562
  • Automatically update all visible dashboard reports in the realtime view
  • Connect via TLS when using HTTPS scheme in ClickHouse URL #2570
  • Add error message in case a transfer to an invited (but not joined) user is requested #2651
  • Fix bug with showing property breakdown with a prop filter
  • Fix bug when combining goal and prop filters #2654
  • Fix broken favicons when domain includes a slash

Changed

  • Treat page filter as entry page filter for bounce_rate
  • Reject events with long URIs and data URIs #2536
  • Always show direct traffic in sources reports #2531
  • Stop recording XX and T1 country codes #2556
  • Device type is now determined from the User-Agent instead of window.innerWidth #2711
  • Add padding by default to embedded dashboards so that shadows are not cut off #2744
  • Update the User Agents database (https://github.com/matomo-org/device-detector/releases/tag/6.1.1)

Removed

  • Remove Firewall plug and IP_BLOCKLIST environment variable
  • Remove the ability to collapse the main graph #2627
  • Remove custom_dimension_filter feature flag #2996