📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Merge branch 'main' into improvement/stripe-to-paddle-migration
Andrii R7d6cc28a3d8a
diff --cc public/index.htmlindex 9aa7437d9,d18cd4f2e..02e8a68d5--- a/public/index.html+++ b/public/index.html@@@ -24,8 -25,16 +25,17 @@@<body class="transition-colors duration-300"><noscript>You need to enable JavaScript to run this app.</noscript>+ <div class="loader" id="loader">+ <div class="loader-head">+ <div class="first"></div>+ <div class="second"></div>+ </div>+ <div class="logo-frame">+ <img class="logo-frame-img" src="/assets/logo_blue.svg" alt="" />+ </div>+ </div><div id="root"></div>+ <script src="https://cdn.paddle.com/paddle/paddle.js"></script></body></html>diff --cc src/App.jsindex 3dd491059,b5ef2627b..bd4222193--- a/src/App.js+++ b/src/App.js@@@ -70,27 -68,17 +70,38 @@@ const App = () =>const { message, type } = useSelector(state => state.alerts)const accessToken = getAccessToken()+ const paddleCallback = (data) => {+ dispatch(UIActions.setPaddleLastEvent(data))+ }++ useEffect(() => {+ const interval = setInterval(paddleSetup, 200)+ function paddleSetup() {+ if (!isSelfhosted) {+ if (window.Paddle) {+ window.Paddle.Setup({+ vendor: 139393,+ eventCallback: paddleCallback,+ })+ clearInterval(interval)+ }+ } else {+ clearInterval(interval)+ }+ }+ }, [])++ useEffect(() => {+ const loaderEl = document.getElementById('loader')++ if (loaderEl) {+ loaderEl.classList.add('available')+ setTimeout(() => {+ loaderEl.outerHTML = ''+ }, 1000)+ }+ }, [])+useEffect(() => {(async () => {if (accessToken && !authenticated) {diff --cc src/redux/constants/index.jsindex ad8cb2985,631ddf879..db5917269--- a/src/redux/constants/index.js+++ b/src/redux/constants/index.js@@@ -50,10 -50,8 +50,11 @@@ export const LS_THEME_SETTING = 'colourexport const DONATE_URL = 'https://ko-fi.com/andriir'export const FIREFOX_ADDON_URL = 'https://addons.mozilla.org/en-US/firefox/addon/swetrix/'export const CHROME_EXTENSION_URL = 'https://chrome.google.com/webstore/detail/swetrix/glbeclfdldjldjonfnpnembfkhphmeld'+ export const HAVE_I_BEEN_PWNED_URL = 'https://haveibeenpwned.com/passwords'+export const CONTACT_EMAIL = '[email protected]'+export const SECURITY_EMAIL = '[email protected]'+export const isSelfhosted = Boolean(process.env.REACT_APP_SELFHOSTED)export const LIVE_VISITORS_UPDATE_INTERVAL = 40000