Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
draft: implement realtime current users
Manda Putraf5ecc401bf47
diff --git a/README.md b/README.mdindex 98fe2150a..39feb3951 100644--- a/README.md+++ b/README.md@@ -18,7 +18,7 @@ A detailed getting started guide can be found at [https://umami.is/docs/](https:```git clone https://github.com/mikecao/umami.gitcd umami-npm install+yarn```### Create database tables@@ -50,6 +50,7 @@ HASH_SALT=(any random string)```The connection url is in the following format:+```postgresql://username:mypassword@localhost:5432/mydb@@ -70,7 +71,7 @@ npm run buildnpm start```-By default this will launch the application on `http://localhost:3000`. You will need to either+By default this will launch the application on `http://localhost:3000`. You will need to either[proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) requests from your web serveror change the [port](https://nextjs.org/docs/api-reference/cli#production) to serve the application directly.@@ -83,11 +84,13 @@ docker-compose up```Alternatively, to pull just the Umami Docker image with PostgreSQL support:+```bashdocker pull ghcr.io/mikecao/umami:postgresql-latest```Or with MySQL support:+```bashdocker pull ghcr.io/mikecao/umami:mysql-latest```diff --git a/components/metrics/RealtimeHeader.js b/components/metrics/RealtimeHeader.jsindex c501937a1..204339b8d 100644--- a/components/metrics/RealtimeHeader.js+++ b/components/metrics/RealtimeHeader.js@@ -2,6 +2,7 @@ import React from 'react';import { FormattedMessage } from 'react-intl';import PageHeader from '../layout/PageHeader';import DropDown from '../common/DropDown';+import ActiveUsers from './ActiveUsers';import MetricCard from './MetricCard';import styles from './RealtimeHeader.module.css';@@ -24,6 +25,9 @@ export default function RealtimeHeader({ websites, data, websiteId, onSelect })<div><FormattedMessage id="label.realtime" defaultMessage="Realtime" /></div>+ <div>+ <ActiveUsers className={styles.active} websiteId={websiteId} />+ </div><DropDown value={websiteId} options={options} onChange={onSelect} /></PageHeader><div className={styles.metrics}>