diff --git a/.env.example b/.env.example index 58abfd6..9ae2a46 100644 --- a/.env.example +++ b/.env.example @@ -79,3 +79,5 @@ VITE_ADSENSE_SLOT_BOTTOM_BANNER=1234567893 FEATURE_EDITOR=true FEATURE_OCR=true FEATURE_REMOVEBG=true + +VITE_CLARITY_PROJECT_ID=vzw2jb2ipq \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index f55acf1..6478bbb 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,78 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - Dociva — Free Online File Tools - - - -
- - - - \ No newline at end of file + })(); + + + + + + + + Dociva — Free Online File Tools + + +
+ + + diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index f7264bb..5e4f8f4 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,4 +1,5 @@ import { lazy, Suspense, useEffect } from 'react'; +import Clarity from '@microsoft/clarity'; import { Routes, Route, useLocation } from 'react-router-dom'; import { Toaster } from 'sonner'; import Header from '@/components/layout/Header'; @@ -95,6 +96,14 @@ export default function App() { void refreshUser(); }, [refreshUser]); + // Microsoft Clarity: Run only in production and browser + useEffect(() => { + if (import.meta.env.PROD && typeof window !== 'undefined') { + // ضع هنا رقم مشروع Clarity الخاص بك بدلاً من 'YOUR_CLARITY_PROJECT_ID' + Clarity.start(import.meta.env.VITE_CLARITY_PROJECT_ID); + } + }, []); + useEffect(() => { trackPageView(`${location.pathname}${location.search}`); }, [location.pathname, location.search]); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..692f85e --- /dev/null +++ b/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "SaaS-PDF", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@microsoft/clarity": "^1.0.2" + } + }, + "node_modules/@microsoft/clarity": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@microsoft/clarity/-/clarity-1.0.2.tgz", + "integrity": "sha512-9EZYROFpJxEGmQpHvUFqvD3ZJ7QQSqnibYSWmS+1xusoZfG1QQ1/Al9yVBBc11DWMbJrs1pe1hLT273it/skJg==", + "license": "MIT" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..d3ecad9 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@microsoft/clarity": "^1.0.2" + } +}