diff --git a/frontend/src/AppRoutes/index.tsx b/frontend/src/AppRoutes/index.tsx
index 38874ccd2a..56ba19fdf4 100644
--- a/frontend/src/AppRoutes/index.tsx
+++ b/frontend/src/AppRoutes/index.tsx
@@ -93,6 +93,8 @@ function App(): JSX.Element {
email: user?.email,
name: user?.name,
});
+
+ window.clarity('identify', user.email, user.name);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isLoggedInState, user]);
diff --git a/frontend/src/index.html.ejs b/frontend/src/index.html.ejs
index 8fe2ea80bb..abfd8258bb 100644
--- a/frontend/src/index.html.ejs
+++ b/frontend/src/index.html.ejs
@@ -1,170 +1,189 @@
-
-
-
-
-
-
-
-
-
- Open source Observability platform | SigNoz
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Open source Observability platform | SigNoz
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/typings/window.ts b/frontend/src/typings/window.ts
index a05152e5a5..02197e2444 100644
--- a/frontend/src/typings/window.ts
+++ b/frontend/src/typings/window.ts
@@ -1,8 +1,11 @@
import { compose, Store } from 'redux';
+type ClarityType = (...args: string[]) => T;
+
declare global {
interface Window {
store: Store;
+ clarity: ClarityType;
analytics: Record;
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: typeof compose;
}
diff --git a/frontend/webpack.config.js b/frontend/webpack.config.js
index 8690e5e55f..5fe07bfa87 100644
--- a/frontend/webpack.config.js
+++ b/frontend/webpack.config.js
@@ -21,6 +21,7 @@ const plugins = [
template: 'src/index.html.ejs',
INTERCOM_APP_ID: process.env.INTERCOM_APP_ID,
SEGMENT_ID: process.env.SEGMENT_ID,
+ CLARITY_PROJECT_ID: process.env.CLARITY_PROJECT_ID,
}),
new webpack.ProvidePlugin({
process: 'process/browser',
@@ -31,6 +32,7 @@ const plugins = [
FRONTEND_API_ENDPOINT: process.env.FRONTEND_API_ENDPOINT,
INTERCOM_APP_ID: process.env.INTERCOM_APP_ID,
SEGMENT_ID: process.env.SEGMENT_ID,
+ CLARITY_PROJECT_ID: process.env.CLARITY_PROJECT_ID,
}),
}),
];
diff --git a/frontend/webpack.config.prod.js b/frontend/webpack.config.prod.js
index b35c471fff..c75ea52944 100644
--- a/frontend/webpack.config.prod.js
+++ b/frontend/webpack.config.prod.js
@@ -25,6 +25,7 @@ const plugins = [
template: 'src/index.html.ejs',
INTERCOM_APP_ID: process.env.INTERCOM_APP_ID,
SEGMENT_ID: process.env.SEGMENT_ID,
+ CLARITY_PROJECT_ID: process.env.CLARITY_PROJECT_ID,
}),
new CompressionPlugin({
exclude: /.map$/,
@@ -40,6 +41,7 @@ const plugins = [
FRONTEND_API_ENDPOINT: process.env.FRONTEND_API_ENDPOINT,
INTERCOM_APP_ID: process.env.INTERCOM_APP_ID,
SEGMENT_ID: process.env.SEGMENT_ID,
+ CLARITY_PROJECT_ID: process.env.CLARITY_PROJECT_ID,
}),
}),
new MiniCssExtractPlugin(),