Merge pull request #128 from chamikaJ/chore/add-analytics

Chore/add analytics
This commit is contained in:
Chamika J
2025-05-15 13:30:05 +05:30
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -16,6 +16,16 @@
<script src="/env-config.js"></script>
<!-- Unregister service worker -->
<script src="/unregister-sw.js"></script>
<!-- Microsoft Clarity -->
<script type="text/javascript">
if (window.location.hostname === 'app.worklenz.com' && window.VITE_CLARITY_ID) {
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", window.VITE_CLARITY_ID);
}
</script>
</head>
<body>

View File

@@ -34,6 +34,7 @@ const mainRoutes: RouteObject[] = [
path: '/worklenz',
element: <MainLayout />,
children: [
{ index: true, element: <Navigate to="home" replace /> },
{ path: 'home', element: <HomePage /> },
{ path: 'projects', element: <ProjectList /> },
{