+ We Value Your Privacy
+
+
+ We collect anonymous usage data to improve our software. This information helps us understand how the software is used and identify areas for improvement.
+
+ No personally identifiable information is collected.
+
+
+
>
);
}
diff --git a/ui/src/main.jsx b/ui/src/main.jsx
index 3ba75116..c5ce6269 100644
--- a/ui/src/main.jsx
+++ b/ui/src/main.jsx
@@ -1,11 +1,15 @@
+import { initializeFaro, withFaroRouterInstrumentation } from '@grafana/faro-react';
import React, { StrictMode, Suspense } from 'react';
import ReactDOM from 'react-dom/client';
import { Provider } from 'react-redux';
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
-import { store } from './store/configureStore';
-import { modelsRoutes } from './container/models/routes';
-import App from './container/app';
+import { getCookieConsentValue } from 'react-cookie-consent';
import { notFoundRoute } from './components/ErrorPage';
+import App from './container/app';
+import { modelsRoutes } from './container/models/routes';
+import { store } from './store/configureStore';
+
+const enableGrafanaTracking = getCookieConsentValue('rbit-tracking');
const router = createBrowserRouter([
{
@@ -18,12 +22,27 @@ const router = createBrowserRouter([
},
]);
+if (enableGrafanaTracking === 'true') {
+ initializeFaro({
+ // required: the URL of the Grafana collector
+ url: 'https://telemetry.oss.radicalbit.ai',
+ apiKey: 'rbitoss-JpIYMVC677edETUbJN9Me3iLS7ngGaE2RYLzQWCOYVljUJh5JJk5o2FE',
+
+ // required: the identification label of your application
+ app: {
+ name: 'radicalbit-ai-monitoring',
+ },
+ });
+}
+
+const browserRouter = (enableGrafanaTracking === 'true') ? withFaroRouterInstrumentation(router) : router;
+
ReactDOM.createRoot(document.getElementById('root')).render(