📈 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
Improve SEO
Blue Mouse5818df5ca4cb
diff --git a/web/app/pages/Blog/Post.tsx b/web/app/pages/Blog/Post.tsxindex d708e5f73..73fb20864 100644--- a/web/app/pages/Blog/Post.tsx+++ b/web/app/pages/Blog/Post.tsx@@ -80,7 +80,7 @@ export default function PostSlug() {<imgclassName='size-12 rounded-full'src={`/assets/blog-authors/${post.twitter_handle}.png`}- alt=''+ alt={post.author || ''}/>) : null}<div className='flex flex-col gap-0.5 text-sm leading-4'>@@ -107,6 +107,47 @@ export default function PostSlug() {<div dangerouslySetInnerHTML={{ __html: post.html }} /></div></article>+ {post.title ? (+ <script+ type='application/ld+json'+ dangerouslySetInnerHTML={{+ __html: JSON.stringify({+ '@context': 'https://schema.org',+ '@type': 'BlogPosting',+ headline: post.title,+ ...(post.intro && { description: post.intro }),+ ...(post.date && {+ datePublished: post.date,+ dateModified: post.date,+ }),+ ...(post.author && {+ author: {+ '@type': 'Person',+ name: post.author,+ ...(post.twitter_handle && {+ url: `https://x.com/${post.twitter_handle}`,+ }),+ },+ }),+ publisher: {+ '@type': 'Organization',+ name: 'Swetrix',+ url: 'https://swetrix.com',+ logo: {+ '@type': 'ImageObject',+ url: 'https://swetrix.com/assets/logo_blue.png',+ },+ },+ mainEntityOfPage: {+ '@type': 'WebPage',+ '@id': `https://swetrix.com${location.pathname}`,+ },+ })+ .replace(/</g, '\\u003c')+ .replace(/\u2028|\u2029/g, ''),+ }}+ />+ ) : null}</main></div></div>diff --git a/web/app/pages/Dashboard/Dashboard.tsx b/web/app/pages/Dashboard/Dashboard.tsxindex d91f045be..f2eb79013 100644--- a/web/app/pages/Dashboard/Dashboard.tsx+++ b/web/app/pages/Dashboard/Dashboard.tsx@@ -354,7 +354,7 @@ const Dashboard = () => {<div className='mb-4 flex flex-wrap justify-between gap-2'><div className='flex items-end justify-between'><Text- as='h2'+ as='h1'size='3xl'weight='bold'className='mt-2 flex items-baseline gap-2'diff --git a/web/app/routes/3rd-party-unsubscribe.$token.tsx b/web/app/routes/3rd-party-unsubscribe.$token.tsxindex aa4b691ae..994e58f42 100644--- a/web/app/routes/3rd-party-unsubscribe.$token.tsx+++ b/web/app/routes/3rd-party-unsubscribe.$token.tsx@@ -1,4 +1,4 @@-import type { LoaderFunctionArgs } from 'react-router'+import type { LoaderFunctionArgs, MetaFunction } from 'react-router'import { redirect, useLoaderData } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'@@ -6,11 +6,17 @@ import { serverFetch } from '~/api/api.server'import { isSelfhosted } from '~/lib/constants'import StatusPage from '~/ui/StatusPage'import routes from '~/utils/routes'+import { getTitle } from '~/utils/seo'export const sitemap: SitemapFunction = () => ({exclude: true,})+export const meta: MetaFunction = () => [+ ...getTitle('Unsubscribe'),+ { name: 'robots', content: 'noindex' },+]+export interface UnsubscribeLoaderData {success: booleanerror?: stringdiff --git a/web/app/routes/_index.tsx b/web/app/routes/_index.tsxindex b578747ce..5cb9c56e9 100644--- a/web/app/routes/_index.tsx+++ b/web/app/routes/_index.tsx@@ -411,6 +411,48 @@ const Hero = () => {)}+const SOFTWARE_APPLICATION_JSONLD = {+ '@context': 'https://schema.org',+ '@type': 'SoftwareApplication',+ name: 'Swetrix',+ url: 'https://swetrix.com',+ applicationCategory: 'WebApplication',+ operatingSystem: 'All',+ offers: {+ '@type': 'AggregateOffer',+ priceCurrency: 'USD',+ lowPrice: '19',+ highPrice: '419',+ offerCount: '9',+ description: '14-day free trial, then paid plans from $19/month',+ },+ description:+ 'Privacy-first, cookieless Google Analytics alternative with real-time analytics, no sampling, and built-in performance & error monitoring.',+ featureList: [+ 'Cookie-free tracking',+ 'Traffic web analytics',+ 'Session analysis',+ 'Website speed analytics',+ 'Error tracking',+ 'Funnels',+ 'Feature flags',+ 'Experiments',+ 'reCAPTCHA alternative',+ 'API access',+ 'Team members',+ ],+ screenshot: 'https://swetrix.com/assets/screenshot_light.png',+ softwareHelp: {+ '@type': 'WebPage',+ url: 'https://swetrix.com/docs',+ },+ author: {+ '@type': 'Organization',+ name: 'Swetrix',+ url: 'https://swetrix.com',+ },+}+export default function Index() {const { metainfo } = useLoaderData<typeof loader>()@@ -431,6 +473,14 @@ export default function Index() {<DitchGoogle /></main>+ <script+ type='application/ld+json'+ dangerouslySetInnerHTML={{+ __html: JSON.stringify(SOFTWARE_APPLICATION_JSONLD)+ .replace(/</g, '\\u003c')+ .replace(/\u2028|\u2029/g, ''),+ }}+ /></div>)}diff --git a/web/app/routes/gsc-connected.tsx b/web/app/routes/gsc-connected.tsxindex 544b89668..ccb5d41f9 100644--- a/web/app/routes/gsc-connected.tsx+++ b/web/app/routes/gsc-connected.tsx@@ -1,6 +1,6 @@import _replace from 'lodash/replace'import { useEffect, useState } from 'react'-import type { LoaderFunctionArgs } from 'react-router'+import type { LoaderFunctionArgs, MetaFunction } from 'react-router'import { redirect, useLoaderData, useNavigate } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'@@ -9,11 +9,17 @@ import { useAuthProxy } from '~/hooks/useAuthProxy'import { isSelfhosted } from '~/lib/constants'import StatusPage from '~/ui/StatusPage'import routes from '~/utils/routes'+import { getTitle } from '~/utils/seo'export const sitemap: SitemapFunction = () => ({exclude: true,})+export const meta: MetaFunction = () => [+ ...getTitle('Google Search Console Connected'),+ { name: 'robots', content: 'noindex' },+]+export interface GscConnectedLoaderData {error?: stringuseClientFallback?: booleandiff --git a/web/app/routes/pay.tsx b/web/app/routes/pay.tsxindex 1d3dc5bca..4c580deaf 100644--- a/web/app/routes/pay.tsx+++ b/web/app/routes/pay.tsx@@ -1,14 +1,21 @@import { useEffect } from 'react'+import type { MetaFunction } from 'react-router'import { redirect } from 'react-router'import type { SitemapFunction } from 'remix-sitemap'import { ExternalScriptsHandle } from 'remix-utils/external-scripts'import { isSelfhosted } from '~/lib/constants'+import { getTitle } from '~/utils/seo'export const sitemap: SitemapFunction = () => ({exclude: true,})+export const meta: MetaFunction = () => [+ ...getTitle('Payment'),+ { name: 'robots', content: 'noindex' },+]+export const handle: ExternalScriptsHandle = {scripts: [{diff --git a/web/app/routes/tools._index.tsx b/web/app/routes/tools._index.tsxindex 5150a8dc4..f5fd17822 100644--- a/web/app/routes/tools._index.tsx+++ b/web/app/routes/tools._index.tsx@@ -7,11 +7,14 @@ import { DitchGoogle } from '~/components/marketing/DitchGoogle'import { TOOLS } from '~/components/ToolsNav'import { getOgImageUrl, isSelfhosted } from '~/lib/constants'import { Text } from '~/ui/Text'-import { getPreviewImage, getTitle } from '~/utils/seo'+import { getDescription, getPreviewImage, getTitle } from '~/utils/seo'export const meta: MetaFunction = () => {return [...getTitle('Free Marketing Tools'),+ ...getDescription(+ 'Professional marketing calculators and generators to optimize your campaigns, track performance, and maximize ROI. No sign-up required.',+ ),...getPreviewImage(getOgImageUrl('Free Marketing Tools')),]}diff --git a/web/app/ui/Flag.tsx b/web/app/ui/Flag.tsxindex 1463b671b..941f84d1c 100644--- a/web/app/ui/Flag.tsx+++ b/web/app/ui/Flag.tsx@@ -24,7 +24,7 @@ const Flag = ({ country, size = 24, alt, ...props }: FlagProps) => {return (<imgsrc={`${FLAGS_PREFIX_PATH}/${countryLower}.svg`}- alt={alt || ' '}+ alt={alt || ''}{...props}width={width}height={height}