mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
even better analytics config stuffs
This commit is contained in:
@@ -21,3 +21,4 @@ webui/package-lock.json
|
||||
!server/data/
|
||||
!server/data/barcode-registry.json
|
||||
webui/src/config/analytics.jsx
|
||||
webui/src/config/driverAnalytics.json
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="Roomba Rover" />
|
||||
<title>Roomba Rover</title>
|
||||
<script type="module" crossorigin src="/assets/index-Ba7BWqKj.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CEC620cF.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CjmiVAqR.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// Main Application Shell
|
||||
// Purpose: Composes the primary rover control interface and page-level layout. Scope: Orchestrates high-level panels, overlays, and feature modules for the default route.
|
||||
import DriverAnalytics from './config/analytics.jsx';
|
||||
import DriverAnalytics from './components/DriverAnalytics/index.jsx';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import TelemetryPanel from './components/TelemetryPanel/index.jsx';
|
||||
import PiHostStatsCard from './components/PiHostStatsCard/index.jsx';
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { useEffect } from 'react';
|
||||
import config from '../../config/driverAnalytics.json';
|
||||
|
||||
export default function DriverAnalytics() {
|
||||
useEffect(() => {
|
||||
if (!config.enabled) return;
|
||||
|
||||
document.head.append(
|
||||
document
|
||||
.createRange()
|
||||
.createContextualFragment(config.tags.join('\n'))
|
||||
);
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
export default function DriverAnalytics() {
|
||||
return(
|
||||
<>
|
||||
<script defer src="https://analytics.otter.land/script.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7"></script>
|
||||
<script defer src="https://analytics.otter.land/recorder.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-sample-rate="0.4" data-mask-level="moderate" data-max-duration="300000"></script>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"enabled": true,
|
||||
"tags": [
|
||||
"<script defer src=\"https://analytics.otter.land/script.js\" data-website-id=\"82dd56a5-db44-4279-bd1e-a4d9fee39af7\"></script>",
|
||||
"<script defer src=\"https://analytics.otter.land/recorder.js\" data-website-id=\"82dd56a5-db44-4279-bd1e-a4d9fee39af7\" data-sample-rate=\"0.4\" data-mask-level=\"moderate\" data-max-duration=\"300000\"></script>"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user