Migrate from Umami
Move from Umami to trckable: one PostgreSQL query exports every pageview and event, and trckable imports it with sessions, sources and goals rebuilt.
Umami keeps every pageview and event in its own PostgreSQL database, one row each, which is exactly what trckable imports. The general order (run both for a week, import, compare, switch) is on Migrating.
Export
Find the site's id (the website_id column, also in the website table), then run this against Umami's database. It joins each event
to its session for the country and device, and names the columns the way
trckable reads them:
psql "$DATABASE_URL" -c "\copy (
SELECT to_char(e.created_at AT TIME ZONE 'UTC', 'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"') AS ts,
e.url_path AS path, e.session_id AS visitor,
e.event_name AS goal, e.referrer_domain AS referrer,
s.country, s.region, s.city, s.browser, s.os, s.device
FROM website_event e JOIN session s ON s.session_id = e.session_id
WHERE e.website_id = 'your-website-id'
ORDER BY e.created_at
) TO 'umami.csv' WITH CSV HEADER"Two details matter:
- Keep the column list as it is. Umami's
event_typecolumn is a number (1 for a pageview, 2 for an event); left in, a pageview could read as a goal named "1". - The column names are from Umami's current schema (prisma/schema.prisma). If the query names a column your database does not have, check your version's schema.
- The timestamp is written as UTC with its zone. That is the format the importer reads without guessing.
On Umami Cloud there is no database to query. Umami's Cloud FAQ says your data can be exported; check that export's columns against the table below before importing, since trckable needs one row per event, not totals.
Import
With the server stopped, as described on Migrating:
trckabled import tkb_a1b2c3d4 umami.csv| From Umami | Becomes |
|---|---|
| Rows with no event name | Pageviews |
| Rows with an event name | A goal of the same name |
session_id | The visitor, hashed on the way in |
referrer_domain | The source, unless it is your own site |
| Country, region, city, browser, OS, device | The same fields |
Sessions, entry pages and bounces are rebuilt by trckable from the rows, so they follow trckable's rules. Revenue sent as Umami event data is not imported as money; connect your payment provider instead, which brings its own history.