diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0689addb3..a7d83e61f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,11 @@ All notable changes to this project will be documented in this file.
## Unreleased
+### Added
+- 'Last updated X seconds ago' info to 'current visitors' tooltips
+
### Fixed
+- Cascade delete sent_renewal_notifications table when user is deleted plausible/analytics#2549
- Show appropriate top-stat metric labels on the realtime dashboard when filtering by a goal
- Fix breakdown API pagination when using event metrics plausible/analytics#2562
- Automatically update all visible dashboard reports in the realtime view
@@ -14,9 +18,6 @@ All notable changes to this project will be documented in this file.
- Always show direct traffic in sources reports plausible/analytics#2531
- Stop recording XX and T1 country codes plausible/analytics#2556
-## Fixed
-- Cascade delete sent_renewal_notifications table when user is deleted plausible/analytics#2549
-
## v1.5.1 - 2022-12-06
### Fixed
diff --git a/assets/css/app.css b/assets/css/app.css
index 55b09f4ad..939d8e531 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -135,8 +135,6 @@ blockquote {
.pulsating-circle {
position: absolute;
- left: 50%;
- top: 50%;
width: 10px;
height: 10px;
}
diff --git a/assets/js/dashboard/historical.js b/assets/js/dashboard/historical.js
index 8c97ca0d0..486a5ecf4 100644
--- a/assets/js/dashboard/historical.js
+++ b/assets/js/dashboard/historical.js
@@ -13,6 +13,8 @@ import Conversions from './stats/conversions'
import { withPinnedHeader } from './pinned-header-hoc';
function Historical(props) {
+ const tooltipBoundary = React.useRef(null)
+
function renderConversions() {
if (props.site.hasGoals) {
return (
@@ -30,9 +32,9 @@ function Historical(props) {
@@ -452,7 +452,7 @@ export default class VisitorGraph extends React.Component {
return (
-
+
)
}
diff --git a/assets/js/dashboard/util/seconds-since-last-load.js b/assets/js/dashboard/util/seconds-since-last-load.js
new file mode 100644
index 000000000..e47330a05
--- /dev/null
+++ b/assets/js/dashboard/util/seconds-since-last-load.js
@@ -0,0 +1,15 @@
+import { useState, useEffect } from "react";
+
+// A function component that renders an integer value of how many
+// seconds have passed from the last data load on the dashboard.
+// Updates the value every second when the component is visible.
+export function SecondsSinceLastLoad({ lastLoadTimestamp }) {
+ const [timeNow, setTimeNow] = useState(new Date())
+
+ useEffect(() => {
+ const interval = setInterval(() => setTimeNow(new Date()), 1000)
+ return () => clearInterval(interval)
+ }, []);
+
+ return Math.round(Math.abs(lastLoadTimestamp - timeNow) / 1000)
+}
diff --git a/lib/plausible_web/templates/stats/waiting_first_pageview.html.eex b/lib/plausible_web/templates/stats/waiting_first_pageview.html.eex
index ea34a30ef..8bed44247 100644
--- a/lib/plausible_web/templates/stats/waiting_first_pageview.html.eex
+++ b/lib/plausible_web/templates/stats/waiting_first_pageview.html.eex
@@ -23,7 +23,7 @@
Waiting for first pageview
on <%= @site.domain %>
-
+
Need to see the snippet again? <%= link("Click here", to: "/#{URI.encode_www_form(@site.domain)}/snippet", class: "text-indigo-600 dark:text-indigo-500 text-underline")%>
Not working? <%= link("Troubleshoot the integration", to: "https://plausible.io/docs/troubleshoot-integration#keep-seeing-a-blinking-green-dot", class: "text-indigo-600 dark:text-indigo-500 text-underline", rel: "noreferrer") %> with our guide