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!

Better SEO / goals / funnels empty states

Blue Mouseef5a523c987a
diff --git a/web/app/lib/constants/index.ts b/web/app/lib/constants/index.ts
index 806283687..aefb35f83 100644
--- a/web/app/lib/constants/index.ts
+++ b/web/app/lib/constants/index.ts
@@ -538,7 +538,7 @@ export const localisePath = (pathname: string, lang: string): string => {
// Increase this counter every time some major change is done within localisation files
// This will prevent cached version or raw locale strings being displayed in production
-export const I18N_CACHE_BREAKER = 42
+export const I18N_CACHE_BREAKER = 43
export const roles: Role[] = ['admin', 'viewer']
diff --git a/web/app/pages/Project/tabs/Funnels/FunnelsView.tsx b/web/app/pages/Project/tabs/Funnels/FunnelsView.tsx
index d4262e57d..216ab0baa 100644
--- a/web/app/pages/Project/tabs/Funnels/FunnelsView.tsx
+++ b/web/app/pages/Project/tabs/Funnels/FunnelsView.tsx
@@ -4,7 +4,7 @@ import _includes from 'lodash/includes'
import _isEmpty from 'lodash/isEmpty'
import { FunnelIcon, PlusIcon } from '@phosphor-icons/react'
import { useState, useEffect, useMemo, useCallback, useRef } from 'react'
-import { useTranslation } from 'react-i18next'
+import { Trans, useTranslation } from 'react-i18next'
import {
useSearchParams,
useFetcher,
@@ -14,7 +14,7 @@ import {
import { toast } from 'sonner'
import type { FunnelDataResponse } from '~/api/api.server'
-import { FUNNELS_PERIOD_PAIRS } from '~/lib/constants'
+import { DOCS_URL, FUNNELS_PERIOD_PAIRS } from '~/lib/constants'
import type { Funnel } from '~/lib/models/Project'
import NewFunnel from '~/modals/NewFunnel'
import FunnelsList from '~/pages/Project/tabs/Funnels/FunnelsList'
@@ -46,6 +46,8 @@ interface FunnelsViewProps {
tnMapping: Record<string, string>
}
+const FUNNELS_DOCS_URL = `${DOCS_URL}/analytics-dashboard/funnels`
+
const FunnelsView = ({ tnMapping }: FunnelsViewProps) => {
const { funnelData: funnelDataPromise } = useLoaderData<ProjectLoaderData>()
const { id, project, mergeProject, allowedToManage } = useCurrentProject()
@@ -292,7 +294,21 @@ const FunnelsView = ({ tnMapping }: FunnelsViewProps) => {
colour='secondary'
className='mx-auto mt-2 max-w-md whitespace-pre-wrap'
>
- {t('dashboard.funnelsDesc')}
+ <Trans
+ t={t}
+ i18nKey='dashboard.funnelsDesc'
+ components={{
+ docs: (
+ <a
+ href={FUNNELS_DOCS_URL}
+ aria-label={t('ariaLabels.openFunnelsGuide')}
+ className='font-medium underline decoration-dashed hover:decoration-solid'
+ target='_blank'
+ rel='noreferrer noopener'
+ />
+ ),
+ }}
+ />
</Text>
<div className='mt-6'>
{isAuthenticated && allowedToManage ? (
diff --git a/web/app/pages/Project/tabs/Goals/GoalsView.tsx b/web/app/pages/Project/tabs/Goals/GoalsView.tsx
index efca5471d..8194b1652 100644
--- a/web/app/pages/Project/tabs/Goals/GoalsView.tsx
+++ b/web/app/pages/Project/tabs/Goals/GoalsView.tsx
@@ -29,7 +29,7 @@ import {
use,
type MouseEvent,
} from 'react'
-import { useTranslation } from 'react-i18next'
+import { Trans, useTranslation } from 'react-i18next'
import { useFetcher, useLoaderData, useRevalidator } from 'react-router'
import { toast } from 'sonner'
@@ -49,6 +49,7 @@ import {
tbsFormatMapperTooltip24h,
chartTypes,
DEFAULT_TIMEZONE,
+ DOCS_URL,
} from '~/lib/constants'
import DashboardHeader from '~/pages/Project/View/components/DashboardHeader'
import Filters from '~/pages/Project/View/components/Filters'
@@ -88,6 +89,7 @@ import GoalSettingsModal from './GoalSettingsModal'
import { LoaderView } from '../../View/components/LoaderView'
const DEFAULT_GOALS_TAKE = 20
+const GOALS_DOCS_URL = `${DOCS_URL}/analytics-dashboard/goals`
const GOAL_TOOLTIP_BREAKDOWN_LIMIT = 3
const isDurationValue = (seconds?: number | null): seconds is number =>
@@ -1171,7 +1173,21 @@ const GoalsViewInner = ({
colour='secondary'
className='mx-auto mt-2 max-w-md whitespace-pre-wrap'
>
- {t('goals.description')}
+ <Trans
+ t={t}
+ i18nKey='goals.description'
+ components={{
+ docs: (
+ <a
+ href={GOALS_DOCS_URL}
+ aria-label={t('ariaLabels.openGoalsGuide')}
+ className='font-medium underline decoration-dashed hover:decoration-solid'
+ target='_blank'
+ rel='noreferrer noopener'
+ />
+ ),
+ }}
+ />
</Text>
<div className='mt-6'>
<Button size='lg' onClick={handleNewGoal}>
diff --git a/web/app/pages/Project/tabs/SEO/SEOView.tsx b/web/app/pages/Project/tabs/SEO/SEOView.tsx
index 8ecba1dcc..bdbe338f8 100644
--- a/web/app/pages/Project/tabs/SEO/SEOView.tsx
+++ b/web/app/pages/Project/tabs/SEO/SEOView.tsx
@@ -26,6 +26,7 @@ import { Link } from '~/ui/Link'
import { useLoaderData, useSearchParams } from 'react-router'
import { useGSCDashboardProxy } from '~/hooks/useAnalyticsProxy'
+import { DOCS_URL } from '~/lib/constants'
import type { TimeBucket } from '~/lib/constants'
import type { Entry } from '~/lib/models/Entry'
import BillboardChart from '~/ui/BillboardChart'
@@ -86,6 +87,8 @@ interface SEOViewProps {
tnMapping: Record<string, string>
}
+const SEO_DOCS_URL = `${DOCS_URL}/analytics-dashboard/seo`
+
const SEOViewInner = ({ projectId, tnMapping }: SEOViewProps) => {
const {
t,
@@ -740,7 +743,21 @@ const SEOViewInner = ({ projectId, tnMapping }: SEOViewProps) => {
colour='secondary'
className='mx-auto mt-2 max-w-md'
>
- {t('project.seo.connectGSCDesc')}
+ <Trans
+ t={t}
+ i18nKey='project.seo.connectGSCDesc'
+ components={{
+ docs: (
+ <a
+ href={SEO_DOCS_URL}
+ aria-label={t('ariaLabels.openSeoGuide')}
+ className='font-medium underline decoration-dashed hover:decoration-solid'
+ target='_blank'
+ rel='noreferrer noopener'
+ />
+ ),
+ }}
+ />
</Text>
{data?.noProperty ? (
<Text
diff --git a/web/public/locales/en.json b/web/public/locales/en.json
index 20c2244c6..ec0bb426a 100644
--- a/web/public/locales/en.json
+++ b/web/public/locales/en.json
@@ -182,6 +182,8 @@
"openExperimentsGuide": "Open Experiments guide",
"openFeatureFlagsGuide": "Open Feature Flags guide",
"openFeedbackForm": "Open feedback form",
+ "openFunnelsGuide": "Open Funnels guide",
+ "openGoalsGuide": "Open Goals guide",
"openGoogleSearchConsole": "Open Google Search Console",
"openGoogleSearchConsoleSelfHostingGuide": "Open Google Search Console self-hosting guide",
"openHaveIBeenPwned": "Open Have I Been Pwned",
@@ -191,6 +193,7 @@
"openSwetrixOnX": "Open Swetrix on X",
"openSwetrixWebsite": "Open Swetrix website",
"openSessionReplaysGuide": "Open Session replays guide",
+ "openSeoGuide": "Open SEO guide",
"openTimezoneSettings": "Open timezone settings",
"openTrackingSetupDocumentation": "Open tracking setup documentation",
"openTroubleshootingGuide": "Open troubleshooting guide",
@@ -1209,7 +1212,7 @@
"webAnalytics": "Web analytics",
"productAnalytics": "Product analytics",
"revenueAnalytics": "Revenue analytics",
- "funnelsDesc": "Funnels is a powerful tool that allows you to track the conversion rate of your users through a series of steps.\nThe analysis provided by the marketing funnel gives you the ability to discover potential problems, improve your website, and boost your conversion rate.",
+ "funnelsDesc": "Funnels help you track how visitors move through a sequence of pages and events.\nUse them to spot drop-offs in sign-up, checkout, onboarding, or any other flow.\n<docs>Learn more in the docs</docs>.",
"frontend": "Frontend",
"backend": "Backend",
"network": "Network",
@@ -1379,7 +1382,7 @@
},
"goals": {
"title": "Goals",
- "description": "Conversion goals help you track important user actions on your website.\nDefine pageview goals or custom event goals to measure how many visitors complete specific actions.",
+ "description": "Conversion goals help you track important user actions on your website.\nDefine pageview goals or custom event goals to measure how many visitors complete specific actions.\n<docs>Learn more in the docs</docs>.",
"add": "Add goal",
"addGoal": "Add Goal",
"filterGoals": "Filter goals",
@@ -1775,7 +1778,7 @@
"title": "SEO",
"desc": "Search performance for {{url}}",
"connectGSC": "Connect Google Search Console to see search performance data",
- "connectGSCDesc": "Link your Google Search Console account to view clicks, impressions, search queries, and top pages from Google Search.",
+ "connectGSCDesc": "Link your Google Search Console account to view clicks, impressions, search queries, and top pages from Google Search.\n<docs>Learn more in the docs</docs>.",
"connectButton": "Connect Search Console",
"searchEngines": "Search engines",
"aiReferrals": "AI referrals",