update readme

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-11-04 13:43:21 +01:00
parent f5670253bc
commit 3c7c47c5b1

View File

@@ -4,11 +4,12 @@
# mixan # mixan
Mixan is a simple analytics tool for logging events on web and react-native. My goal is to make a minimal mixpanel copy with the most basic features (for now). Mixan is a simple analytics tool for logging events on web and react-native. My goal is to make a minimal mixpanel copy with the most basic features (for now).
* Easy to use - Easy to use
* Own your own data - Fully responsive UI
* GDPR friendly - Own your own data
- GDPR friendly
## Whats left? ## Whats left?
@@ -16,32 +17,32 @@ Mixan is a simple analytics tool for logging events on web and react-native. My
### GUI ### GUI
* [X] Fix tables on settings - [x] Fix tables on settings
* [ ] Rename event label - [ ] Rename event label
* [ ] Real time data (mostly screen_views stats) - [ ] Real time data (mostly screen_views stats)
* [ ] Active users (5min, 10min, 30min) - [ ] Active users (5min, 10min, 30min)
* [X] Save report to a specific dashboard - [x] Save report to a specific dashboard
* [X] View events in a list - [x] View events in a list
* [ ] Simple filters - [ ] Simple filters
* [ ] View profiles in a list - [*] View profiles in a list
* [ ] Invite users - [ ] Invite users
* [ ] Drag n Drop reports on dashboard - [ ] Drag n Drop reports on dashboard
* [ ] Manage dashboards - [ ] Manage dashboards
* [ ] Support more chart types - [ ] Support more chart types
* [X] Bar - [x] Bar
* [ ] Pie - [ ] Pie
* [ ] Area - [ ] Area
* [ ] Support funnels - [ ] Support funnels
* [ ] Support multiple breakdowns - [ ] Support multiple breakdowns
* [ ] Aggregations (sum, average...) - [ ] Aggregations (sum, average...)
### SDK ### SDK
* [ ] Store duration on screen view events (can be done in backend as well) - [*] Store duration on screen view events (can be done in backend as well)
* [ ] Create native sdk - [ ] Create native sdk
* [ ] Handle sessions - [ ] Handle sessions
* [ ] Create web sdk - [ ] Create web sdk
* [ ] Screen view function should take in title, path and parse query string (especially utm tags) - [ ] Screen view function should take in title, path and parse query string (especially utm tags)
## @mixan/sdk ## @mixan/sdk
@@ -66,52 +67,62 @@ const mixan = new Mixan({
verbose: false, verbose: false,
saveProfileId(id) { saveProfileId(id) {
// Web // Web
localStorage.setItem('@profileId', id) localStorage.setItem('@profileId', id);
// // react-native-mmkv // // react-native-mmkv
// mmkv.setItem('@profileId', id) // mmkv.setItem('@profileId', id)
}, },
removeProfileId() { removeProfileId() {
// Web // Web
localStorage.removeItem('@profileId') localStorage.removeItem('@profileId');
// // react-native-mmkv // // react-native-mmkv
// mmkv.delete('@profileId') // mmkv.delete('@profileId')
}, },
getProfileId() { getProfileId() {
// Web // Web
return localStorage.getItem('@profileId') return localStorage.getItem('@profileId');
// // react-native-mmkv // // react-native-mmkv
// return mmkv.getString('@profileId') // return mmkv.getString('@profileId')
}, },
}) });
// Call this before you send any events
// It will create a anonymous profile
// This profile will be merged if you call `setUser` in a later stage
mixan.init();
mixan.setUser({ mixan.setUser({
id: 'id', id: 'id',
first_name: 'John', first_name: 'John',
last_name: 'Doe', last_name: 'Doe',
email: 'john.doe@gmail.com', email: 'john.doe@gmail.com',
properties: {} // any properties properties: {}, // any properties
}) });
// will upsert 'app_open' on user property and increment it // will upsert 'app_open' on user property and increment it
mixan.increment('app_open') mixan.increment('app_open');
// will upsert 'app_open' on user property and increment it by 10 // will upsert 'app_open' on user property and increment it by 10
mixan.increment('app_open', 10) mixan.increment('app_open', 10);
// will upsert 'app_open' on user property and decrement it by 2 // will upsert 'app_open' on user property and decrement it by 2
mixan.decrement('app_open', 2) mixan.decrement('app_open', 2);
// send a sign_in event // send a sign_in event
mixan.event('sign_in') mixan.event('sign_in');
// send a sign_in event with properties // send a sign_in event with properties
mixan.event('sign_in', { mixan.event('sign_in', {
provider: 'gmail' provider: 'gmail',
}) });
// short hand for 'screen_view', can also take any properties // short hand for 'screen_view', can also take any properties
mixan.screenView('Profile', { mixan.screenView('Profile', {
id: '123', id: '123',
// any other properties, url, public // any other properties, url, public
}) });
// Call this when a user is logged out.
// This will just make sure you do not send
// the associated profile id for the next events
mixan.clear();
``` ```
## @mixan/backend ## @mixan/backend
@@ -123,4 +134,4 @@ Self hosted service for collecting all events. Dockerfile and GUI will be added
![Line chart](images/line.png) ![Line chart](images/line.png)
![Bar chart](images/bar.png) ![Bar chart](images/bar.png)
![Dashboard](images/dashboard.png) ![Dashboard](images/dashboard.png)
![Settings](images/settings.png) ![Settings](images/settings.png)