v1.37.0

umami-software/umamiv1.37.0Aug 10, 2022by mikecao

AI Summary

A major release introducing a new database schema for Events, new languages, and dashboard editing capabilities.

Key Highlights

  • Major database migration renaming columns to `event_name` and adding `event_data` JSON table.
  • Added Thai and Bengali languages.
  • Edit dashboard feature added allowing users to sort websites.
  • Query parameters section renamed to capture all URL parameters.

Breaking Changes

  • Database schema changes for Events; old data stored in `_event_old` table requiring manual migration or deletion.

New Features

  • New Events model.
  • Thai and Bengali languages.
  • Edit dashboard feature.
  • Query parameters capture.
  • Runtime environment variable access.

Full Release Notes

## Important
This release includes a new database migration. In this update we are making some changes to Events. Now instead of `event_type` and `event_value` columns, there is going to be a single renamed column, `event_name`. Having the two separate columns caused a lot of confusion regarding what to store in each field. There is now a new table called `event_data` which is used to store event related data. In the future you will be able to run reports against your events and event data.

Now to track events, you simply choose an event name, like `button-click` and optionally send some JSON data along with it.

```javascript
umami.trackEvent('button-click', { userId: 123, buttonName: 'Newsletter signup' });
```

When you start the app for the first time, the database changes will be automatically applied. Your data however will not be automatically migrated because we can't determine what `event_name` you will want to use. Your old event table has been renamed to `_event_old`, which you can use to manually move data to the new table. If you've never used events, feel free to delete the `_event_old` table.

## Features
- New model for Events ☝️ 
- New languages: Thai and Bengali! 🐯 🥳 
- Edit dashboard feature. You can now sort websites on the dashboard

![umami2](https://user-images.githubusercontent.com/477975/183797077-fe356d46-dcd6-416c-8fbd-b0fa81112ecc.gif)
- UTM parameters section is now **Query parameters**. This now  captures all the URL query parameters, not just UTM
![image](https://user-images.githubusercontent.com/477975/183799970-1f20654e-9bc6-488b-842a-490c631b5884.png)
- Refactored handling of environment variables. Before, some environment variables had to be defined at built-time versus run-time, which caused a lot of issues for Docker users. With this change we can now access all environment variables at runtime. No need to rebuild the application or Docker image.

## Fixes
- Updated Docker build to work with `COLLECT_API_ENDPOINT`
- Removed `DISABLE_LOGIN` check from middleware due to Vercel issues.
- Fixed issue with Heroku deploy

## Updates
- Upgraded Next.js to `12.2.4`
- Upgraded Prisma to `4.1.1`
- Language translation updates.

A huge thanks to all the contributors on this release! @cywio @briancao @wangyang0210 @biqette @umarhadi @H0rn0chse