Migrate from Umami
Swap the script, map your events and import your history. Most sites finish in under 30 minutes.
1. Swap the script tag
Add your site in Glyphex, then copy the script tag from Settings, Tracking. It replaces the Umami tag. Run both for a few days if you want to compare numbers, then remove the Umami tag.
Umami
<script defer src="https://cloud.umami.is/script.js" data-website-id="YOUR_UMAMI_WEBSITE_ID"></script>
Glyphex
<script defer src="https://glyphex.io/t/YOUR_SITE_ID.js"></script>
Umami script options map like this:
| Umami | Glyphex |
|---|---|
| data-website-id | The site id inside the /t/YOUR_SITE_ID.js URL |
| data-do-not-track="true" | Not needed. Do Not Track and Global Privacy Control are honoured by default |
| data-domains | Not needed. Glyphex only accepts hits from your registered domain and its subdomains |
| data-exclude-search | Not needed. Glyphex records the path without the query string |
| data-performance="true" | Core Web Vitals toggle in Settings, Tracking |
2. Map your custom events
Umami's umami.track(name, data) becomes window.analytics.track(name, properties). The arguments have the same meaning. See custom events for the full API.
Umami
umami.track('signup', { plan: 'pro' });Glyphex
window.analytics.track('signup', { plan: 'pro' });Umami's HTML attributes have direct equivalents. data-glyphex-event sets the event name and data-glyphex-event-<name> sets a property, the same way Umami does.
Umami
<button data-umami-event="signup" data-umami-event-plan="pro"> Sign up </button>
Glyphex
<button data-glyphex-event="signup" data-glyphex-event-plan="pro"> Sign up </button>
3. Import your history
Glyphex can import page views and custom events from Umami as a CSV. You produce the CSV with one query against your Umami database, then upload it in your site settings.
Step 1: export from Postgres
Run this query against your Umami database. Replace YOUR_UMAMI_WEBSITE_ID with the id from Umami, Settings, Websites.
SELECT e.created_at, e.url_path, e.url_query, e.referrer_domain, e.referrer_path, e.page_title, e.event_type, e.event_name, e.hostname, e.utm_source, e.utm_medium, e.utm_campaign, e.utm_term, e.utm_content, e.session_id, e.visit_id, s.browser, s.os, s.device, s.screen, s.country, s.region, s.city FROM website_event e JOIN session s ON s.session_id = e.session_id WHERE e.website_id = 'YOUR_UMAMI_WEBSITE_ID' AND e.event_type IN (1, 2) ORDER BY e.created_at
# Save the query above as umami-export.sql (no trailing semicolon), then run: psql "$DATABASE_URL" \ -c "COPY ($(cat umami-export.sql)) TO STDOUT WITH (FORMAT csv, HEADER true)" \ > umami-export.csv
Step 2 (MySQL instead): export from MySQL
If Umami runs on MySQL, use this query instead. The server needs write access to the OUTFILE folder. The first row is the header.
SELECT 'created_at', 'url_path', 'url_query', 'referrer_domain', 'referrer_path', 'page_title', 'event_type', 'event_name', 'hostname', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'session_id', 'visit_id', 'browser', 'os', 'device', 'screen', 'country', 'region', 'city' UNION ALL SELECT DATE_FORMAT(e.created_at, '%Y-%m-%d %H:%i:%s'), e.url_path, e.url_query, e.referrer_domain, e.referrer_path, e.page_title, e.event_type, e.event_name, e.hostname, e.utm_source, e.utm_medium, e.utm_campaign, e.utm_term, e.utm_content, e.session_id, e.visit_id, s.browser, s.os, s.device, s.screen, s.country, s.region, s.city FROM website_event e JOIN session s ON s.session_id = e.session_id WHERE e.website_id = 'YOUR_UMAMI_WEBSITE_ID' AND e.event_type IN (1, 2) INTO OUTFILE '/var/lib/mysql-files/umami-export.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '"' LINES TERMINATED BY '\n'
Step 3: upload the file
Open Settings, Data in the Glyphex site, find Import from Umami and choose the CSV. Only site owners and admins can import. The import runs in your browser in batches, and you see progress and a result summary.
What gets imported
- Page views (event_type 1) and custom events (event_type 2). Other Umami event types are skipped.
- Path, page title, referrer, UTM fields, country, city, device, browser, OS and screen width.
- Umami visits stay grouped. Session ids are hashed with your Glyphex site id, so nothing links back to Umami.
- The query string of each URL is dropped. UTM values come from the utm columns.
- Custom event properties are not included in the export, so imported events have a name and path only.
- Text that starts with =, +, - or @ gets a leading apostrophe, so spreadsheets cannot run it as a formula when you export your data.
Limits
- Files up to 200 MB. Split larger exports by date range and upload them one after another.
- Rows older than your plan's data history are skipped and counted in the result.
- Each site can hold up to 12 months of your plan's monthly events from imports. Rows over that are skipped.
- Imported rows do not count toward your monthly event usage.
- Importing the same file twice adds the rows twice. Import each date range once.
4. Check the numbers
Compare a recent week in both tools. Small differences are normal: the tools count visitors and sessions in different ways. When you are happy, remove the Umami script.