Skip to content

📈 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!

add seo optimization for main page

Maksim Mrug6524f546ba01
diff --git a/app/components/Title.tsx b/app/components/Title.tsx
deleted file mode 100644
index 3781e6530..000000000
--- a/app/components/Title.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import React from 'react'
-import { Helmet } from 'react-helmet-async'
-import { useTranslation } from 'react-i18next'
-import _isEmpty from 'lodash/isEmpty'
-import _map from 'lodash/map'
-import PropTypes from 'prop-types'
-
-import { TITLE_SUFFIX, whitelist } from 'redux/constants'
-
-interface ITitle {
- title?: string
- children: React.ReactNode
-}
-
-const Title: React.FC<ITitle> = ({ title, children }) => {
- const { i18n: { language } } = useTranslation('common')
-
- if (_isEmpty(title)) {
- return (
- <>
- <Helmet>
- <title>Swetrix Analytics</title>
- </Helmet>
- {children}
- </>
- )
- }
-
- const displayTitle = `${title} ${TITLE_SUFFIX}`
- // const pageURL = `${window.location.origin}${window.location.pathname}`
-
- return (
- <>
- <Helmet>
- <html lang={language} />
- <title>{displayTitle}</title>
- {/* <meta property='og:title' content={displayTitle} />
- <meta name='twitter:title' content={displayTitle} /> */}
- {_map(whitelist, (lang) => (
- <link key={lang} rel='alternate' hrefLang={lang} href={`${''}?lng=${lang}`} />
- ))}
- <link rel='alternate' hrefLang='x-default' href={''} />
- </Helmet>
- {children}
- </>
- )
-}
-
-Title.propTypes = {
- children: PropTypes.node.isRequired,
- title: PropTypes.string,
-}
-
-Title.defaultProps = {
- title: '',
-}
-
-export default Title
diff --git a/app/entry.client.tsx b/app/entry.client.tsx
index 09e076db8..6d0420d40 100644
--- a/app/entry.client.tsx
+++ b/app/entry.client.tsx
@@ -7,7 +7,6 @@
import { RemixBrowser } from '@remix-run/react'
import { startTransition, StrictMode } from 'react'
import { hydrateRoot } from 'react-dom/client'
-import { HelmetProvider } from 'react-helmet-async'
import i18next from 'i18next'
import { I18nextProvider, initReactI18next } from 'react-i18next'
diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx
index 8e1c9c4e1..a47ddbde4 100644
--- a/app/routes/_index.tsx
+++ b/app/routes/_index.tsx
@@ -14,7 +14,6 @@ import _isEmpty from 'lodash/isEmpty'
import routesPath from 'routesPath'
import { nFormatterSeparated } from 'utils/generic'
-import Title from 'components/Title'
import { GITHUB_URL, MARKETPLACE_URL, LIVE_DEMO_URL } from 'redux/constants'
import { StateType } from 'redux/store/index'
import BackgroundSvg from 'ui/icons/BackgroundSvg'
@@ -39,8 +38,15 @@ import Wix from 'ui/icons/Wix'
export const meta: V2_MetaFunction = () => {
return [
- { title: 'New Remix App' },
- { name: 'description', content: 'Welcome to Remix!' },
+ { title: 'Swetrix Analytics' },
+ {
+ name: 'description',
+ content: 'Swetrix Analytics is a privacy-focused, open-source alternative to Google Analytics.',
+ },
+ {
+ name: 'keywords',
+ content: 'analytics, google analytics, privacy, open-source, alternative',
+ },
]
}
@@ -160,7 +166,7 @@ const Main = (): JSX.Element => {
const websites = nFormatterSeparated(Number(stats.projects))
return (
- <Title title={t('titles.main')}>
+ <div>
<div className='flex justify-center items-center bg-slate-900 py-2 px-2'>
<a href='https://bank.gov.ua/en/news/all/natsionalniy-bank-vidkriv-spetsrahunok-dlya-zboru-koshtiv-na-potrebi-armiyi' target='_blank' rel='noreferrer noopener' className='text-white border-gray-900 border-b-2 hover:border-white text-center'>
{t('main.ukrSupport')}
@@ -755,7 +761,7 @@ const Main = (): JSX.Element => {
</main>
</div>
</div>
- </Title>
+ </div>
)
}