🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
feat(docs): competitor registry and X-vs-Y comparison template (#1238)
Goldflagc3dc6c454fec
diff --git a/docs/src/app/[locale]/(home)/compare/[pair]/page.tsx b/docs/src/app/[locale]/(home)/compare/[pair]/page.tsxnew file mode 100644index 000000000..0d9c0993f--- /dev/null+++ b/docs/src/app/[locale]/(home)/compare/[pair]/page.tsx@@ -0,0 +1,100 @@+import { createOGImageUrl } from "@/lib/metadata";+import type { Metadata } from "next";+import { setRequestLocale } from "next-intl/server";+import { notFound } from "next/navigation";+import { VsPage } from "../components/VsPage";+import { getVsPair, vsPairs } from "../data/vsPairs";++// Only allowlisted pairs render. Static siblings (/compare/umami, ...) take precedence over this+// segment, and any other /compare/<slug> 404s.+export const dynamicParams = false;++interface VsPairPageProps {+ params: Promise<{ locale: string; pair: string }>;+}++export function generateStaticParams() {+ return vsPairs.map(pair => ({ pair: pair.slug }));+}++export async function generateMetadata({ params }: VsPairPageProps): Promise<Metadata> {+ const { pair: slug } = await params;+ const pair = getVsPair(slug);+ if (!pair) {+ return {};+ }++ const url = `https://rybbit.com/compare/${pair.slug}`;+ const image = createOGImageUrl(pair.title, pair.metaDescription, "Compare");+ return {+ title: pair.title,+ description: pair.metaDescription,+ openGraph: {+ title: pair.title,+ description: pair.metaDescription,+ type: "website",+ url,+ images: [image],+ },+ twitter: {+ card: "summary_large_image",+ title: pair.title,+ description: pair.metaDescription,+ images: [image],+ },+ alternates: {+ canonical: url,+ },+ };+}++export default async function VsPairPage({ params }: VsPairPageProps) {+ const { locale, pair: slug } = await params;+ setRequestLocale(locale);+ const pair = getVsPair(slug);+ if (!pair) {+ notFound();+ }++ const url = `https://rybbit.com/compare/${pair.slug}`;+ // The FAQPage entries come from the same `pair.faq` the page renders, so they always match.+ const structuredData = {+ "@context": "https://schema.org",+ "@graph": [+ {+ "@type": "WebPage",+ "@id": url,+ name: pair.title,+ description: pair.metaDescription,+ url,+ dateModified: pair.verifiedOn,+ isPartOf: {+ "@type": "WebSite",+ name: "Rybbit",+ url: "https://rybbit.com",+ },+ },+ {+ "@type": "FAQPage",+ mainEntity: pair.faq.map(item => ({+ "@type": "Question",+ name: item.question,+ acceptedAnswer: {+ "@type": "Answer",+ text: item.answer,+ },+ })),+ },+ ],+ };++ return (+ <>+ <script+ type="application/ld+json"+ dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData).replace(/</g, "\\u003c") }}+ />+ <VsPage pair={pair} />+ </>+ );+}diff --git a/docs/src/app/[locale]/(home)/compare/components/VsPage.tsx b/docs/src/app/[locale]/(home)/compare/components/VsPage.tsxnew file mode 100644index 000000000..5214d650e--- /dev/null+++ b/docs/src/app/[locale]/(home)/compare/components/VsPage.tsx@@ -0,0 +1,593 @@+import { CTASection } from "@/components/CTASection";+import { InteriorPageHero } from "@/components/InteriorPageHero";+import { ArrowRight, CheckCircle, ChevronDown, CircleMinus } from "lucide-react";+import { useExtracted } from "next-intl";+import Link from "next/link";+import React from "react";+import {+ canonicalFeatures,+ competitors,+ featureGroups,+ importableCompetitors,+ rybbit,+ type FeatureGroup,+ type FeatureValue,+ type ProductEntry,+} from "../data/competitors";+import type { VsExtraRow, VsLink, VsPair } from "../data/vsPairs";++interface TableRow {+ key: string;+ label: string;+ a: FeatureValue;+ b: FeatureValue;+ rybbit: FeatureValue;+}++interface TableSection {+ group: FeatureGroup;+ title: string;+ rows: TableRow[];+}++const dateFormatter = new Intl.DateTimeFormat("en-US", {+ month: "long",+ day: "numeric",+ year: "numeric",+ timeZone: "UTC",+});++function formatDate(isoDate: string) {+ return dateFormatter.format(new Date(`${isoDate}T00:00:00Z`));+}++function displayUrl(url: string) {+ return url.replace(/^https?:\/\/(www\.)?/, "").replace(/\/$/, "");+}++// "Heatmaps" -> "heatmaps", but "Web Vitals monitoring" and "API access" keep their capitals.+function inSentence(label: string) {+ const rest = label.slice(1);+ return rest === rest.toLowerCase() ? label.charAt(0).toLowerCase() + rest : label;+}++function joinList(items: string[], conjunction: "and" | "or") {+ if (items.length <= 2) return items.join(` ${conjunction} `);+ return `${items.slice(0, -1).join(", ")}, ${conjunction} ${items[items.length - 1]}`;+}++function isOffered(value: FeatureValue) {+ return value === true || typeof value === "string";+}++// Registry rows the pair selected, in canonical order, with the pair's verified extra rows+// slotted in after the feature they name (or at the end of their group).+function buildTableSections(pair: VsPair, a: ProductEntry, b: ProductEntry): TableSection[] {+ const selected = new Set<string>(pair.features);+ const extras = pair.extraRows ?? [];+ const toRow = (extra: VsExtraRow): TableRow => ({+ key: `extra-${extra.label}`,+ label: extra.label,+ a: extra.a,+ b: extra.b,+ rybbit: extra.rybbit,+ });++ return (Object.keys(featureGroups) as FeatureGroup[])+ .map(group => {+ const rows: TableRow[] = [];+ const placed = new Set<VsExtraRow>();+ for (const feature of canonicalFeatures) {+ if (feature.group !== group) continue;+ const aValue = a.features[feature.key];+ const bValue = b.features[feature.key];+ // A row where neither product is documented has nothing to compare.+ if (selected.has(feature.key) && (aValue !== undefined || bValue !== undefined)) {+ rows.push({+ key: feature.key,+ label: feature.label,+ a: aValue,+ b: bValue,+ rybbit: rybbit.features[feature.key],+ });+ }+ for (const extra of extras) {+ if (extra.group === group && extra.after === feature.key) {+ rows.push(toRow(extra));+ placed.add(extra);+ }+ }+ }+ for (const extra of extras) {+ if (extra.group === group && !placed.has(extra)) rows.push(toRow(extra));+ }+ return { group, title: featureGroups[group], rows };+ })+ .filter(section => section.rows.length > 0);+}++// The "third option" facts come from the registry, so they stay in sync with the Rybbit entry.+function buildThirdOptionFacts(sections: TableSection[], a: ProductEntry, b: ProductEntry) {+ const facts: { term: string; detail: React.ReactNode }[] = [{ term: "What it is", detail: rybbit.summary }];++ const gaps = sections+ .flatMap(section => section.rows)+ .filter(row => row.rybbit === false && (isOffered(row.a) || isOffered(row.b)));+ if (gaps.length > 0) {+ facts.push({+ term: "What it lacks here",+ detail: gaps+ .map(row => {+ const owners = [isOffered(row.a) ? a.name : null, isOffered(row.b) ? b.name : null].filter(+ (owner): owner is string => owner !== null+ );+ return `No ${inSentence(row.label)}, which ${joinList(owners, "and")} ${owners.length > 1 ? "offer" : "offers"}.`;+ })+ .join(" "),+ });+ }++ const blocked = [a, b]+ .filter(product => product.features.dataImportIntoRybbit === false)+ .map(product => product.name);+ const importable = [a, b]+ .filter(product => product.features.dataImportIntoRybbit === true)+ .map(product => product.name);+ facts.push({+ term: "Switching",+ detail: (+ <>+ {importable.length > 0 && `It can import your ${joinList(importable, "and")} history. `}+ {blocked.length > 0 &&+ `It can't import ${joinList(blocked, "or")} history, so its reports start on the day you install it. `}+ Its{" "}+ <Link+ href="/docs/data-import"+ className="font-medium text-emerald-600 underline underline-offset-4 dark:text-emerald-400"+ >+ importers+ </Link>{" "}+ cover{" "}+ {joinList(+ importableCompetitors.map(product => product.name),+ "and"+ )}+ .+ </>+ ),+ });++ const pricing = rybbit.pricing;+ facts.push({+ term: "Price",+ detail: [+ `From ${pricing.startingPrice}${pricing.startingPriceIncludes ? ` for ${pricing.startingPriceIncludes}` : ""}${pricing.trial ? `, with a ${pricing.trial}` : ""}.`,+ rybbit.features.selfHostable === true+ ? `Self-hosting is free${rybbit.license ? ` (${rybbit.license})` : ""}.`+ : "",+ ]+ .filter(Boolean)+ .join(" "),+ });++ return facts;+}++function PricingCard({ product }: { product: ProductEntry }) {+ const { pricing } = product;+ return (+ <article className="flex min-w-0 flex-col border-b border-neutral-200 px-5 py-10 last:border-b-0 dark:border-neutral-800 sm:px-8 md:border-b-0 md:first:border-r lg:px-10">+ <p className="text-sm text-neutral-500 dark:text-neutral-400">{pricing.model}</p>+ <h3 className="mt-2 text-xl font-semibold">{product.name}</h3>+ <p className="mt-6 text-3xl font-semibold tracking-tight">{pricing.startingPrice}</p>+ {pricing.startingPriceIncludes && (+ <p className="mt-1 text-sm text-neutral-500 dark:text-neutral-400">{pricing.startingPriceIncludes}</p>+ )}+ <dl className="mt-7 space-y-4 text-sm leading-6">+ <div>+ <dt className="font-medium text-neutral-900 dark:text-neutral-100">Free hosted plan</dt>+ <dd className="text-neutral-600 dark:text-neutral-300">{pricing.freeTier || "None"}</dd>+ </div>+ {pricing.trial && (+ <div>+ <dt className="font-medium text-neutral-900 dark:text-neutral-100">Trial</dt>+ <dd className="text-neutral-600 dark:text-neutral-300">{pricing.trial}</dd>+ </div>+ )}+ </dl>+ {pricing.notes && pricing.notes.length > 0 && (+ <ul className="mt-6 space-y-3">+ {pricing.notes.map(note => (+ <li key={note} className="flex items-start gap-3 text-sm leading-6 text-neutral-700 dark:text-neutral-300">+ <span className="mt-2.5 size-1 shrink-0 rounded-full bg-neutral-400" aria-hidden="true" />+ <span>{note}</span>+ </li>+ ))}+ </ul>+ )}+ <p className="mt-auto pt-8 text-xs leading-5 text-neutral-500 dark:text-neutral-400">+ Source:{" "}+ <a+ href={pricing.sourceUrl}+ target="_blank"+ rel="noopener noreferrer"+ className="font-medium text-neutral-700 underline underline-offset-4 [overflow-wrap:anywhere] hover:text-emerald-600 dark:text-neutral-300 dark:hover:text-emerald-400"+ >+ {displayUrl(pricing.sourceUrl)}+ </a>+ <br />+ Verified {formatDate(pricing.verifiedOn)}+ </p>+ </article>+ );+}++export function VsPage({ pair }: { pair: VsPair }) {+ const t = useExtracted();+ const a: ProductEntry = competitors[pair.a];+ const b: ProductEntry = competitors[pair.b];+ const showRybbit = pair.showRybbitColumn === true;+ const sections = buildTableSections(pair, a, b);+ const thirdOptionFacts = buildThirdOptionFacts(sections, a, b);+ const compareLinks = [a, b].flatMap(product =>+ product.comparePath ? [{ name: product.name, href: product.comparePath }] : []+ );+ const relatedLinks: VsLink[] = [+ ...[a, b].flatMap(product =>+ product.comparePath+ ? [+ {+ title: `Rybbit vs ${product.name}`,+ href: product.comparePath,+ description: `Our feature-by-feature comparison of Rybbit and ${product.name}`,+ },+ ]+ : []+ ),+ ...pair.relatedPosts,+ ];++ const renderValue = (value: FeatureValue) => {+ if (value === undefined) {+ return <span className="text-xs text-neutral-400 dark:text-neutral-500">Not documented</span>;+ }+ if (typeof value === "boolean") {+ return value ? (+ <CheckCircle className="size-5 text-emerald-500" aria-label={t("Included")} />+ ) : (+ <CircleMinus className="size-5 text-neutral-400" aria-label={t("Not included")} />+ );+ }+ return (+ <span className="break-words text-xs leading-5 text-neutral-700 dark:text-neutral-300 sm:text-sm sm:leading-6">+ {value}+ </span>+ );+ };++ return (+ <div className="overflow-x-clip">+ <InteriorPageHero+ eyebrow={t("Comparison")}+ title={`${a.name} vs ${b.name}`}+ description={pair.intro}+ eventLocation={`compare_${pair.slug.replaceAll("-", "_")}_hero`}+ note="We make Rybbit, a competing product. Sources are linked below."+ />++ <section className="border-b border-neutral-200 dark:border-neutral-800" aria-labelledby="vs-verdict-title">+ <div className="mx-auto grid max-w-[1200px] grid-cols-1 border-x border-neutral-200 dark:border-neutral-800 lg:grid-cols-12">+ <div className="border-b border-neutral-200 px-5 py-12 dark:border-neutral-800 sm:px-8 lg:col-span-4 lg:border-b-0 lg:border-r lg:px-10 lg:py-16">+ <h2 id="vs-verdict-title" className="text-3xl font-semibold tracking-[-0.03em] md:text-4xl">+ Quick verdict+ </h2>+ <p className="mt-5 max-w-sm text-sm leading-6 text-neutral-500 dark:text-neutral-400">+ Facts checked against vendor documentation on {formatDate(pair.verifiedOn)}.+ </p>+ </div>+ <div className="min-w-0 lg:col-span-8">+ <p className="border-b border-neutral-200 px-5 py-10 text-lg leading-8 text-neutral-800 dark:border-neutral-800 dark:text-neutral-200 sm:px-8 lg:px-10">+ {pair.verdict.summary}+ </p>+ <div className="grid grid-cols-1 md:grid-cols-2">+ {[+ { product: a, verdict: pair.verdict.a },+ { product: b, verdict: pair.verdict.b },+ ].map(({ product, verdict }, index) => (+ <div+ key={product.slug}+ className={`px-5 py-10 sm:px-8 lg:px-10 ${index === 0 ? "border-b border-neutral-200 dark:border-neutral-800 md:border-b-0 md:border-r" : ""}`}+ >+ <p className="text-xs font-medium uppercase tracking-[0.12em] text-neutral-400">{product.name}</p>+ <h3 className="mt-2 text-xl font-semibold tracking-tight">Best for {verdict.bestFor}</h3>+ <p className="mt-4 text-sm leading-6 text-neutral-600 dark:text-neutral-300">{verdict.reason}</p>+ </div>+ ))}+ </div>+ </div>+ </div>+ </section>++ <section className="border-b border-neutral-200 dark:border-neutral-800" aria-labelledby="vs-table-title">+ <div className="mx-auto max-w-[1200px] border-x border-neutral-200 dark:border-neutral-800">+ <div className="border-b border-neutral-200 px-5 py-12 dark:border-neutral-800 sm:px-8 lg:px-10 lg:py-16">+ <p className="text-sm font-semibold text-neutral-500 dark:text-neutral-400">{t("Feature by feature")}</p>+ <h2 id="vs-table-title" className="mt-4 max-w-3xl text-3xl font-semibold tracking-[-0.03em] md:text-4xl">+ {a.name} and {b.name}, side by side+ </h2>+ </div>+ {/* Fixed layout with equal value columns, so both products stay on screen at phone+ widths. The optional Rybbit column only appears from md up; the third-option+ section covers Rybbit on every screen. */}+ <table className="w-full table-fixed border-collapse text-sm">+ <thead>+ <tr className="border-b border-neutral-200 dark:border-neutral-800">+ <th+ className={`${showRybbit ? "w-[30%] md:w-[28%]" : "w-[30%] md:w-2/5"} px-4 py-5 text-left font-medium text-neutral-500 sm:px-6 lg:px-10`}+ >+ {t("Capability")}+ </th>+ <th className="border-l border-neutral-200 px-3 py-5 text-center font-semibold dark:border-neutral-800 sm:px-6">+ {a.name}+ </th>+ <th className="border-l border-neutral-200 px-3 py-5 text-center font-semibold dark:border-neutral-800 sm:px-6">+ {b.name}+ </th>+ {showRybbit && (+ <th className="hidden border-l border-neutral-200 px-6 py-5 text-center font-medium text-neutral-500 dark:border-neutral-800 dark:text-neutral-400 md:table-cell">+ Rybbit (our product)+ </th>+ )}+ </tr>+ </thead>+ <tbody>+ {sections.map(section => (+ <React.Fragment key={section.group}>+ <tr className="border-b border-neutral-200 bg-neutral-50 dark:border-neutral-800 dark:bg-neutral-900/60">+ {/* Span only the always-visible columns: a colSpan over the hidden Rybbit+ column would keep an empty column on mobile. */}+ <th+ colSpan={3}+ className="px-4 py-3 text-left text-xs font-semibold uppercase tracking-[0.12em] text-neutral-500 sm:px-6 lg:px-10"+ >+ {section.title}+ </th>+ {showRybbit && <td className="hidden md:table-cell" />}+ </tr>+ {section.rows.map(row => (+ <tr+ key={`${section.group}-${row.key}`}+ className="border-b border-neutral-200 last:border-b-0 dark:border-neutral-800"+ >+ <th+ scope="row"+ className="px-4 py-4 text-left font-medium text-neutral-700 dark:text-neutral-300 sm:px-6 lg:px-10"+ >+ {row.label}+ </th>+ <td className="border-l border-neutral-200 px-3 py-4 text-center dark:border-neutral-800 sm:px-6">+ <div className="flex justify-center">{renderValue(row.a)}</div>+ </td>+ <td className="border-l border-neutral-200 px-3 py-4 text-center dark:border-neutral-800 sm:px-6">+ <div className="flex justify-center">{renderValue(row.b)}</div>+ </td>+ {showRybbit && (+ <td className="hidden border-l border-neutral-200 px-6 py-4 text-center dark:border-neutral-800 md:table-cell">+ <div className="flex justify-center">{renderValue(row.rybbit)}</div>+ </td>+ )}+ </tr>+ ))}+ </React.Fragment>+ ))}+ </tbody>+ </table>+ {pair.tableNotes && pair.tableNotes.length > 0 && (+ <div className="space-y-2 border-t border-neutral-200 px-5 py-6 text-xs leading-5 text-neutral-500 dark:border-neutral-800 dark:text-neutral-400 sm:px-8 lg:px-10">+ {pair.tableNotes.map(note => (+ <p key={note} className="max-w-3xl">+ {note}+ </p>+ ))}+ </div>+ )}+ </div>+ </section>++ <section className="border-b border-neutral-200 dark:border-neutral-800" aria-labelledby="vs-pricing-title">+ <div className="mx-auto grid max-w-[1200px] grid-cols-1 border-x border-neutral-200 dark:border-neutral-800 lg:grid-cols-12">+ <div className="border-b border-neutral-200 px-5 py-12 dark:border-neutral-800 sm:px-8 lg:col-span-4 lg:border-b-0 lg:border-r lg:px-10 lg:py-16">+ <p className="text-sm font-semibold text-neutral-500 dark:text-neutral-400">{t("Pricing")}</p>+ <h2 id="vs-pricing-title" className="mt-4 text-3xl font-semibold tracking-[-0.03em] md:text-4xl">+ {t("Pricing comparison")}+ </h2>+ <p className="mt-5 max-w-sm text-base leading-7 text-neutral-600 dark:text-neutral-400">+ Prices change. Each card links to the vendor page it was checked against.+ </p>+ </div>+ <div className="grid min-w-0 grid-cols-1 lg:col-span-8 md:grid-cols-2">+ <PricingCard product={a} />+ <PricingCard product={b} />+ </div>+ </div>+ </section>++ <section className="border-b border-neutral-200 dark:border-neutral-800" aria-labelledby="vs-fit-title">+ <div className="mx-auto grid max-w-[1200px] grid-cols-1 border-x border-neutral-200 dark:border-neutral-800 lg:grid-cols-12">+ <div className="border-b border-neutral-200 px-5 py-12 dark:border-neutral-800 sm:px-8 lg:col-span-4 lg:border-b-0 lg:border-r lg:px-10 lg:py-16">+ <p className="text-sm font-semibold text-neutral-500 dark:text-neutral-400">{t("Comparison")}</p>+ <h2 id="vs-fit-title" className="mt-4 text-3xl font-semibold tracking-[-0.03em] md:text-4xl">+ {t("Which is right for you?")}+ </h2>+ </div>+ <div className="grid min-w-0 grid-cols-1 lg:col-span-8 md:grid-cols-2">+ {[+ { product: a, items: pair.chooseA },+ { product: b, items: pair.chooseB },+ ].map(({ product, items }, index) => (+ <div+ key={product.slug}+ className={`px-5 py-10 sm:px-8 lg:px-10 ${index === 0 ? "border-b border-neutral-200 dark:border-neutral-800 md:border-b-0 md:border-r" : ""}`}+ >+ <h3 className="text-lg font-semibold">+ {t("Choose {competitor} if...", { competitor: product.name })}+ </h3>+ <ul className="mt-6 space-y-4">+ {items.map(item => (+ <li+ key={item}+ className="flex items-start gap-3 text-sm leading-6 text-neutral-700 dark:text-neutral-300"+ >+ <CheckCircle className="mt-0.5 size-4 shrink-0 text-neutral-400" aria-hidden="true" />+ <span>{item}</span>+ </li>+ ))}+ </ul>+ </div>+ ))}+ </div>+ </div>+ </section>++ <section className="border-b border-neutral-200 dark:border-neutral-800" aria-labelledby="vs-third-option-title">+ <div className="mx-auto grid max-w-[1200px] grid-cols-1 border-x border-neutral-200 dark:border-neutral-800 lg:grid-cols-12">+ <div className="border-b border-neutral-200 px-5 py-12 dark:border-neutral-800 sm:px-8 lg:col-span-4 lg:border-b-0 lg:border-r lg:px-10 lg:py-16">+ <h2 id="vs-third-option-title" className="text-3xl font-semibold tracking-[-0.03em] md:text-4xl">+ Considering a third option?+ </h2>+ <p className="mt-5 max-w-sm text-base leading-7 text-neutral-600 dark:text-neutral-400">+ Rybbit is our product, so weigh this section accordingly.+ </p>+ </div>+ <div className="min-w-0 px-5 py-12 sm:px-8 lg:col-span-8 lg:px-10 lg:py-16">+ <dl className="grid grid-cols-1 gap-x-8 gap-y-5 sm:grid-cols-[9rem_minmax(0,1fr)]">+ {thirdOptionFacts.map(fact => (+ <React.Fragment key={fact.term}>+ <dt className="text-sm font-semibold text-neutral-900 dark:text-neutral-100">{fact.term}</dt>+ <dd className="-mt-4 text-sm leading-6 text-neutral-600 dark:text-neutral-300 sm:mt-0">+ {fact.detail}+ </dd>+ </React.Fragment>+ ))}+ </dl>+ {compareLinks.length > 0 && (+ <div className="mt-10 flex flex-col gap-3 sm:flex-row sm:flex-wrap">+ {compareLinks.map(link => (+ <Link+ key={link.href}+ href={link.href}+ className="group inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-neutral-300 px-5 py-2.5 text-sm font-medium text-neutral-900 transition-colors duration-200 hover:bg-neutral-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-500 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-900"+ >+ Rybbit vs {link.name}+ <ArrowRight+ className="size-4 transition-transform group-hover:translate-x-0.5"+ aria-hidden="true"+ />+ </Link>+ ))}+ </div>+ )}+ </div>+ </div>+ </section>++ <section className="border-b border-neutral-200 dark:border-neutral-800" aria-labelledby="vs-faq-title">+ <div className="mx-auto grid max-w-[1200px] grid-cols-1 border-x border-neutral-200 dark:border-neutral-800 lg:grid-cols-12">+ <div className="border-b border-neutral-200 px-5 py-12 dark:border-neutral-800 sm:px-8 lg:col-span-4 lg:border-b-0 lg:border-r lg:px-10 lg:py-16">+ <p className="text-sm font-semibold text-neutral-500 dark:text-neutral-400">{t("FAQ")}</p>+ <h2 id="vs-faq-title" className="mt-4 text-3xl font-semibold tracking-[-0.03em] md:text-4xl">+ {t("Frequently asked questions")}+ </h2>+ </div>+ {/* Native <details> keeps every answer in the HTML (Radix accordions drop closed+ panels), so the visible FAQ always matches the FAQPage JSON-LD. */}+ <div className="min-w-0 lg:col-span-8">+ {pair.faq.map(item => (+ <details+ key={item.question}+ className="group border-b border-neutral-300/50 last:border-b-0 dark:border-neutral-800/50"+ >+ <summary className="flex cursor-pointer list-none items-center justify-between gap-4 px-5 py-5 text-left text-base font-medium transition-colors hover:text-emerald-500 sm:px-8 lg:px-10 dark:hover:text-emerald-400 [&::-webkit-details-marker]:hidden">+ {item.question}+ <ChevronDown+ className="size-4 shrink-0 transition-transform duration-200 group-open:rotate-180"+ aria-hidden="true"+ />+ </summary>+ <p className="px-5 pb-6 text-sm leading-6 text-neutral-700 dark:text-neutral-300 sm:px-8 lg:px-10">+ {item.answer}+ </p>+ </details>+ ))}+ </div>+ </div>+ </section>++ <section className="border-b border-neutral-200 dark:border-neutral-800" aria-labelledby="vs-sources-title">+ <div className="mx-auto grid max-w-[1200px] grid-cols-1 border-x border-neutral-200 dark:border-neutral-800 lg:grid-cols-12">+ <div className="border-b border-neutral-200 px-5 py-12 dark:border-neutral-800 sm:px-8 lg:col-span-4 lg:border-b-0 lg:border-r lg:px-10 lg:py-16">+ <h2 id="vs-sources-title" className="text-3xl font-semibold tracking-[-0.03em] md:text-4xl">+ Sources+ </h2>+ <p className="mt-5 max-w-sm text-base leading-7 text-neutral-600 dark:text-neutral-400">+ Every claim about {a.name} and {b.name} on this page comes from these pages, checked on{" "}+ {formatDate(pair.verifiedOn)}. If a vendor has changed something since, its page is the final word.+ </p>+ </div>+ <ul className="min-w-0 gap-10 px-5 py-12 sm:px-8 md:columns-2 lg:col-span-8 lg:px-10 lg:py-16">+ {pair.sources.map(source => (+ <li key={source.url} className="mb-5 break-inside-avoid">+ <a+ href={source.url}+ target="_blank"+ rel="noopener noreferrer"+ className="group block text-sm leading-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-500"+ >+ <span className="font-medium text-neutral-800 underline-offset-4 group-hover:text-emerald-600 group-hover:underline dark:text-neutral-200 dark:group-hover:text-emerald-400">+ {source.label}+ </span>+ <span className="block text-xs text-neutral-500 [overflow-wrap:anywhere] dark:text-neutral-400">+ {displayUrl(source.url)}+ </span>+ </a>+ </li>+ ))}+ </ul>+ </div>+ </section>++ {relatedLinks.length > 0 && (+ <section className="border-b border-neutral-200 dark:border-neutral-800" aria-labelledby="vs-related-title">+ <div className="mx-auto grid max-w-[1200px] grid-cols-1 border-x border-neutral-200 dark:border-neutral-800 lg:grid-cols-12">+ <div className="border-b border-neutral-200 px-5 py-12 dark:border-neutral-800 sm:px-8 lg:col-span-4 lg:border-b-0 lg:border-r lg:px-10 lg:py-16">+ <p className="text-sm font-semibold text-neutral-500 dark:text-neutral-400">{t("Resources")}</p>+ <h2 id="vs-related-title" className="mt-4 text-3xl font-semibold tracking-[-0.03em] md:text-4xl">+ {t("Related resources")}+ </h2>+ </div>+ <div className="min-w-0 lg:col-span-8">+ {relatedLinks.map(resource => (+ <Link+ key={resource.href}+ href={resource.href}+ className="group grid border-b border-neutral-200 px-5 py-7 last:border-b-0 transition-colors hover:bg-neutral-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-neutral-500 dark:border-neutral-800 dark:hover:bg-neutral-900/60 sm:grid-cols-[minmax(0,0.8fr)_minmax(0,1.2fr)_auto] sm:items-center sm:gap-6 sm:px-8 lg:px-10"+ >+ <span className="font-semibold">{resource.title}</span>+ <span className="mt-1 text-sm leading-6 text-neutral-500 dark:text-neutral-400 sm:mt-0">+ {resource.description}+ </span>+ <ArrowRight+ className="mt-4 size-4 text-neutral-400 transition-transform group-hover:translate-x-1 sm:mt-0"+ aria-hidden="true"+ />+ </Link>+ ))}+ </div>+ </div>+ </section>+ )}++ <CTASection eventLocation="vs_comparison_bottom_cta" />+ </div>+ );+}diff --git a/docs/src/app/[locale]/(home)/compare/components/competitorSummaries.ts b/docs/src/app/[locale]/(home)/compare/components/competitorSummaries.tsindex 80949ea97..153e7a59b 100644--- a/docs/src/app/[locale]/(home)/compare/components/competitorSummaries.ts+++ b/docs/src/app/[locale]/(home)/compare/components/competitorSummaries.ts@@ -1,60 +1,24 @@+import { comparedCompetitors, type CompetitorSlug } from "../data/competitors";import type { OtherAlternative } from "./ComparisonPage";-// One-line summaries for the "Other X alternatives" sections. Keep each claim in line with-// that competitor's comparison-data.tsx (vendor-verified), and update both together.-export const competitorSummaries = {- "google-analytics": {- name: "Google Analytics 4",- href: "/compare/google-analytics",- summary:- "Free and deep, but it sets cookies (so EU visitors need a consent banner), has no session replay, and GA4 reports take real effort to learn.",- },- plausible: {- name: "Plausible",- href: "/compare/plausible",- summary:- "Open source and cookieless with a clean single-page dashboard. No session replay, error tracking, or Web Vitals, and funnels need its Business plan.",- },- umami: {- name: "Umami",- href: "/compare/umami",- summary:- "MIT-licensed with a ~2KB script and a free cloud tier for hobby sites. Funnels and journeys are included; session replay, error tracking, and Web Vitals are not.",- },- fathom: {- name: "Fathom",- href: "/compare/fathom",- summary:- "Polished and cookieless with a tiny script, but closed source and cloud-only, with no funnels, session replay, or free tier.",- },- simpleanalytics: {- name: "Simple Analytics",- href: "/compare/simpleanalytics",- summary:- "Privacy-first with a free tier for hobby sites, but closed source and cloud-only, with no funnels or session replay.",- },- matomo: {- name: "Matomo",- href: "/compare/matomo",- summary:- "The veteran open-source suite with GA-style depth, including session recordings. Self-hosting means maintaining PHP and MySQL, and many features are paid plugins.",- },- posthog: {- name: "PostHog",- href: "/compare/posthog",- summary:- "A product suite with analytics, session replay, error tracking, and feature flags, plus a generous free tier. Each product bills separately, and self-hosting is hard.",- },- "cloudflare-analytics": {- name: "Cloudflare Web Analytics",- href: "/compare/cloudflare-analytics",- summary:- "Free and cookieless, but it samples data, keeps six months of history, and has no custom events, goals, or funnels.",- },-} satisfies Record<string, OtherAlternative>;+export type { CompetitorSlug };-export type CompetitorSlug = keyof typeof competitorSummaries;+// One-line summaries for the "Other X alternatives" sections. The text lives in the competitor+// registry (../data/competitors.ts); keep each claim in line with that competitor's+// comparison-data.tsx (vendor-verified), and update both together.+export const competitorSummaries = Object.fromEntries(+ comparedCompetitors.map(entry => [+ entry.slug,+ { name: entry.fullName ?? entry.name, href: entry.comparePath, summary: entry.summary },+ ])+) as Record<CompetitorSlug, OtherAlternative>;export function pickAlternatives(slugs: CompetitorSlug[]): OtherAlternative[] {- return slugs.map(slug => competitorSummaries[slug]);+ return slugs.map(slug => {+ const alternative = competitorSummaries[slug];+ if (!alternative) {+ throw new Error(`Competitor "${slug}" has no compare page, so it can't be listed as an alternative.`);+ }+ return alternative;+ });}diff --git a/docs/src/app/[locale]/(home)/compare/data/competitors.ts b/docs/src/app/[locale]/(home)/compare/data/competitors.tsnew file mode 100644index 000000000..8b26b7d8d--- /dev/null+++ b/docs/src/app/[locale]/(home)/compare/data/competitors.ts@@ -0,0 +1,556 @@+import { STANDARD_SITE_LIMIT, STANDARD_TEAM_LIMIT } from "@/lib/const";++// Single source of truth for competitor facts on rybbit.com. Comparison hubs, "X vs Y" pages,+// alternatives lists, and future listicles read from here instead of restating facts by hand.+//+// Provenance rules:+// - `features` for the eight competitors mirror the feature tables in each+// compare/<slug>/comparison-data.tsx, except where a comment cites a newer vendor source.+// A feature those tables don't cover stays `undefined` ("not documented"): never fill a gap+// from memory. Change a value only with a vendor source, and update that page's table too.+// - `pricing` is re-checked against `sourceUrl` on the `verifiedOn` date. Re-verify and bump the+// date whenever a price or plan changes.+// - The Rybbit entry comes from the repo: components/PricingSection.tsx, lib/const.ts,+// LICENSE.md, and content/docs (data-import, script, proxy-guide).++export type FeatureValue = boolean | string | undefined;++export const featureGroups = {+ analytics: "Analytics features",+ advanced: "Advanced features",+ privacy: "Privacy & ownership",+ technical: "Technical",+ switching: "Switching to Rybbit",+} as const;++export type FeatureGroup = keyof typeof featureGroups;++// The one canonical feature list every entry is scored against. Adding a feature here is a type+// error until every entry sets it (to `undefined` if the source doesn't cover it).+export const canonicalFeatures = [+ { key: "realtime", label: "Real-time analytics", group: "analytics" },+ { key: "customEvents", label: "Custom events", group: "analytics" },+ { key: "funnels", label: "Funnels", group: "analytics" },+ { key: "userJourneys", label: "User journeys", group: "analytics" },+ { key: "goals", label: "Conversion goals", group: "analytics" },+ { key: "savedSegments", label: "Saved segments", group: "analytics" },+ { key: "utmTracking", label: "UTM tracking", group: "analytics" },+ { key: "publicDashboards", label: "Public dashboards", group: "analytics" },+ { key: "sessionReplay", label: "Session replay", group: "advanced" },+ { key: "heatmaps", label: "Heatmaps", group: "advanced" },+ { key: "userProfiles", label: "User profiles", group: "advanced" },+ { key: "webVitals", label: "Web Vitals monitoring", group: "advanced" },+ { key: "errorTracking", label: "Error tracking", group: "advanced" },+ { key: "globeView", label: "Real-time globe view", group: "advanced" },+ { key: "autocapture", label: "Autocapture", group: "advanced" },+ { key: "cookieFree", label: "Cookie-free tracking", group: "privacy" },+ { key: "noPersonalData", label: "No personal data collection", group: "privacy" },+ { key: "dailyRotatingSalt", label: "Daily rotating salt", group: "privacy" },+ { key: "openSource", label: "Open source", group: "privacy" },+ { key: "selfHostable", label: "Self-hostable", group: "privacy" },+ { key: "scriptSize", label: "Script size", group: "technical" },+ { key: "bypassesAdBlockers", label: "Bypasses ad blockers", group: "technical" },+ { key: "apiAccess", label: "API access", group: "technical" },+ // Whether Rybbit's importer can bring this tool's history over (see /docs/data-import).+ { key: "dataImportIntoRybbit", label: "Rybbit can import its history", group: "switching" },+] as const satisfies readonly { key: string; label: string; group: FeatureGroup }[];++export type FeatureKey = (typeof canonicalFeatures)[number]["key"];++// Every key is required; `undefined` means "not documented".+export type FeatureMap = Record<FeatureKey, FeatureValue>;++export type CompetitorCategory = "web-analytics" | "product-analytics" | "session-replay";++export interface PricingFacts {+ model: string;+ startingPrice: string;+ /** What the starting price covers, e.g. "100k events/month". */+ startingPriceIncludes?: string;+ /** A free hosted plan, or `false` if there is none. Free self-hosting belongs in `notes`. */+ freeTier: string | false;+ trial?: string;+ notes?: string[];+ sourceUrl: string;+ /** ISO date (YYYY-MM-DD) the pricing was last checked against `sourceUrl`. */+ verifiedOn: string;+}++export interface ProductEntry {+ slug: string;+ /** Display name used in headings, hub cards, and "X vs Y" titles. */+ name: string;+ /** Formal product name where it differs from `name` (used in alternatives lists). */+ fullName?: string;+ website: string;+ category: CompetitorCategory;+ license?: string;+ /** The Rybbit-vs-competitor page, if one exists. */+ comparePath?: string;+ /** One-line trade-off summary for "Other X alternatives" sections. */+ summary: string;+ /** Card text on the /compare hub. Entries without it don't appear on the hub. */+ hubDescription?: string;+ pricing: PricingFacts;+ features: FeatureMap;+}++// Key order is the /compare hub order.+export const competitors = {+ "google-analytics": {+ slug: "google-analytics",+ name: "Google Analytics",+ fullName: "Google Analytics 4",+ website: "https://marketingplatform.google.com/about/analytics/",+ category: "web-analytics",+ comparePath: "/compare/google-analytics",+ summary:+ "Free and deep, but it sets cookies (so EU visitors need a consent banner), has no session replay, and GA4 reports take real effort to learn.",+ hubDescription: "Privacy-first alternative to the most popular analytics platform",+ pricing: {+ model: "Free; Analytics 360 is the paid enterprise tier",+ startingPrice: "Free",+ freeTier: "Standard GA4 is free of charge",+ notes: [+ "Analytics 360 has no public price; Google sells it through its sales team",+ "Standard properties keep event data for explorations for 2 or 14 months",+ ],+ sourceUrl: "https://marketingplatform.google.com/about/analytics/",+ verifiedOn: "2026-09-27",+ },+ features: {+ realtime: true,+ customEvents: true,+ funnels: true,+ userJourneys: true,+ goals: true,+ savedSegments: "Explorations only",+ utmTracking: true,+ publicDashboards: false,+ sessionReplay: false,+ heatmaps: undefined,+ userProfiles: false,+ webVitals: true,+ errorTracking: false,+ globeView: false,+ autocapture: false,+ cookieFree: false,+ noPersonalData: false,+ dailyRotatingSalt: false,+ openSource: false,+ selfHostable: false,+ scriptSize: "371KB",+ bypassesAdBlockers: false,+ apiAccess: true,+ dataImportIntoRybbit: false,+ },+ },+ plausible: {+ slug: "plausible",+ name: "Plausible",+ website: "https://plausible.io",+ category: "web-analytics",+ comparePath: "/compare/plausible",+ summary:+ "Open source and cookieless with a clean single-page dashboard. No session replay, error tracking, or Web Vitals, and funnels need its Business plan.",+ hubDescription: "More features with the same privacy-first approach",+ pricing: {+ model: "Pageview-based pricing",+ startingPrice: "$9/mo",+ startingPriceIncludes: "10k pageviews/month, 1 site",+ freeTier: false,+ trial: "30-day free trial, no credit card",+ notes: [+ "Funnels, journeys, and the Stats API need the $19/mo Business plan",+ "Self-hosted Community Edition is free",+ ],+ sourceUrl: "https://plausible.io/#pricing",+ verifiedOn: "2026-09-27",+ },+ features: {+ realtime: true,+ customEvents: "Basic",+ funnels: "Business plan only",+ userJourneys: "Business plan only",+ goals: true,+ savedSegments: true,+ utmTracking: true,+ publicDashboards: true,+ sessionReplay: false,+ heatmaps: undefined,+ userProfiles: false,+ webVitals: false,+ errorTracking: false,+ globeView: false,+ autocapture: false,+ cookieFree: true,+ noPersonalData: true,+ dailyRotatingSalt: false,+ openSource: true,+ selfHostable: true,+ scriptSize: "~5KB",+ bypassesAdBlockers: true,+ apiAccess: "Business plan only",+ dataImportIntoRybbit: true,+ },+ },+ posthog: {+ slug: "posthog",+ name: "PostHog",+ website: "https://posthog.com",+ category: "product-analytics",+ comparePath: "/compare/posthog",+ summary:+ "A product suite with analytics, session replay, error tracking, and feature flags, plus a generous free tier. Each product bills separately, and self-hosting is hard.",+ hubDescription: "Focused web analytics vs a full product suite",+ pricing: {+ model: "Usage-based, billed per product",+ startingPrice: "Free",+ startingPriceIncludes: "1M product analytics events/month",+ freeTier: "1M product analytics events/month free, no credit card",+ notes: [+ "Session replay, feature flags, and surveys each have their own free allowance and bill",+ "Paid product analytics starts at $0.00005/event (1–2M events)",+ ],+ sourceUrl: "https://posthog.com/pricing",+ verifiedOn: "2026-09-27",+ },+ features: {+ realtime: true,+ customEvents: "With properties",+ funnels: true,+ userJourneys: true,+ goals: true,+ savedSegments: "Cohorts",+ utmTracking: true,+ publicDashboards: true,+ sessionReplay: true,+ heatmaps: undefined,+ userProfiles: true,+ webVitals: true,+ errorTracking: true,+ globeView: false,+ autocapture: true,+ cookieFree: "Optional",+ noPersonalData: false,+ dailyRotatingSalt: false,+ openSource: true,+ selfHostable: "Very difficult",+ scriptSize: "~60KB",+ bypassesAdBlockers: "With proxy",+ apiAccess: true,+ dataImportIntoRybbit: false,+ },+ },+ umami: {+ slug: "umami",+ name: "Umami",+ website: "https://umami.is",+ category: "web-analytics",+ license: "MIT",+ comparePath: "/compare/umami",+ summary:+ "MIT-licensed with a ~2KB script and a free cloud tier for hobby sites. Funnels, journeys, session replay, heatmaps, and Web Vitals are included; error tracking is not.",+ hubDescription: "Advanced features on top of open-source simplicity",+ pricing: {+ model: "Free tier + paid cloud",+ startingPrice: "Free",+ startingPriceIncludes: "Hobby plan: 100k events/month, 1 website",+ freeTier: "Hobby cloud plan is free (100k events/month, 1 website)",+ trial: "14-day free trial on paid plans",+ notes: ["Pro plan at $20/mo for 1M events", "Self-hosted version is free (MIT)"],+ sourceUrl: "https://umami.is/pricing",+ verifiedOn: "2026-09-27",+ },+ features: {+ realtime: true,+ customEvents: "With properties",+ funnels: true,+ userJourneys: true,+ goals: true,+ savedSegments: true,+ utmTracking: true,+ publicDashboards: true,+ // Newer than /compare/umami (which still says no). Verified 2026-09-27, all opt-in:+ // docs.umami.is/docs/replays (v3.1.0), docs.umami.is/docs/heatmaps (v3.2.0),+ // docs.umami.is/docs/performance (LCP, INP, CLS, FCP, TTFB; v3.1.0).+ sessionReplay: "Yes (v3.1+)",+ heatmaps: "Click & scroll (v3.2+)",+ userProfiles: true,+ webVitals: "Yes (v3.1+)",+ errorTracking: false,+ globeView: false,+ autocapture: false,+ cookieFree: true,+ noPersonalData: true,+ dailyRotatingSalt: false,+ openSource: true,+ selfHostable: true,+ scriptSize: "~2KB",+ bypassesAdBlockers: true,+ apiAccess: true,+ dataImportIntoRybbit: true,+ },+ },+ fathom: {+ slug: "fathom",+ name: "Fathom",+ website: "https://usefathom.com",+ category: "web-analytics",+ comparePath: "/compare/fathom",+ summary:+ "Polished and cookieless with a tiny script, but closed source and cloud-only, with no funnels, session replay, or free tier.",+ hubDescription: "Open-source transparency with deeper analytics",+ pricing: {+ model: "Pageview-based pricing",+ startingPrice: "$15/mo",+ startingPriceIncludes: "100k pageviews/month",+ freeTier: false,+ trial: "7-day free trial, card required",+ notes: ["All features included on every plan", "Every plan includes at least 50 sites"],+ sourceUrl: "https://usefathom.com/pricing",+ verifiedOn: "2026-09-27",+ },+ features: {+ realtime: true,+ customEvents: "Basic",+ funnels: false,+ userJourneys: false,+ goals: true,+ savedSegments: true,+ utmTracking: true,+ publicDashboards: true,+ sessionReplay: false,+ heatmaps: undefined,+ userProfiles: false,+ webVitals: false,+ errorTracking: false,+ globeView: false,+ autocapture: false,+ cookieFree: true,+ noPersonalData: true,+ dailyRotatingSalt: false,+ openSource: false,+ selfHostable: false,+ scriptSize: "~2KB",+ bypassesAdBlockers: true,+ apiAccess: true,+ dataImportIntoRybbit: false,+ },+ },+ simpleanalytics: {+ slug: "simpleanalytics",+ name: "Simple Analytics",+ website: "https://www.simpleanalytics.com",+ category: "web-analytics",+ comparePath: "/compare/simpleanalytics",+ summary:+ "Privacy-first with a free tier for hobby sites, but closed source and cloud-only, with no funnels or session replay.",+ hubDescription: "Feature-rich analytics without sacrificing privacy",+ pricing: {+ model: "Per-user + pageview pricing",+ startingPrice: "$20/mo",+ startingPriceIncludes: "1 user, from 100k pageviews/month",+ freeTier: "Free plan for hobby sites: 1 user, 5 websites, 1 month of history",+ trial: "14-day free trial, no credit card",+ notes: ["Each extra team member is +$20/mo", "Cloud-only, no self-hosting option"],+ sourceUrl: "https://www.simpleanalytics.com/pricing",+ verifiedOn: "2026-09-27",+ },+ features: {+ realtime: true,+ customEvents: "Basic",+ funnels: false,+ userJourneys: false,+ goals: true,+ savedSegments: false,+ utmTracking: true,+ publicDashboards: true,+ sessionReplay: false,+ heatmaps: undefined,+ userProfiles: false,+ webVitals: false,+ errorTracking: false,+ globeView: false,+ autocapture: false,+ cookieFree: true,+ noPersonalData: true,+ dailyRotatingSalt: false,+ openSource: false,+ selfHostable: false,+ scriptSize: "~6KB",+ bypassesAdBlockers: true,+ apiAccess: true,+ dataImportIntoRybbit: true,+ },+ },+ matomo: {+ slug: "matomo",+ name: "Matomo",+ website: "https://matomo.org",+ category: "web-analytics",+ comparePath: "/compare/matomo",+ summary:+ "The veteran open-source suite with GA-style depth, including session recordings. Self-hosting means maintaining PHP and MySQL, and many features are paid plugins.",+ hubDescription: "Modern alternative to the legacy PHP analytics platform",+ pricing: {+ model: "Hit-based pricing (Cloud)",+ // matomo.org prices Cloud in the visitor's currency; this is the US price. The "€29" on+ // /compare/matomo matches a placeholder in matomo.org's static HTML that its pricing+ // script replaces with the local price, so it couldn't be verified.+ startingPrice: "$26/mo",+ startingPriceIncludes: "50,000 hits/month (US pricing)",+ freeTier: false,+ trial: "21-day free Cloud trial, no credit card",+ notes: [+ "On-Premise edition is free forever (GPL), with unlimited users and hits",+ "On-Premise premium features are paid plugins, sold individually or in bundles",+ "2 months free with annual Cloud billing",+ ],+ sourceUrl: "https://matomo.org/pricing/",+ verifiedOn: "2026-09-27",+ },+ features: {+ realtime: true,+ customEvents: true,+ funnels: true,+ userJourneys: false,+ goals: true,+ savedSegments: true,+ utmTracking: true,+ publicDashboards: false,+ sessionReplay: true,+ heatmaps: undefined,+ userProfiles: true,+ webVitals: false,+ errorTracking: false,+ globeView: false,+ autocapture: false,+ cookieFree: "Optional",+ noPersonalData: false,+ dailyRotatingSalt: false,+ openSource: true,+ selfHostable: true,+ scriptSize: "20-50KB",+ bypassesAdBlockers: false,+ apiAccess: true,+ dataImportIntoRybbit: false,+ },+ },+ "cloudflare-analytics": {+ slug: "cloudflare-analytics",+ name: "Cloudflare Analytics",+ fullName: "Cloudflare Web Analytics",+ website: "https://www.cloudflare.com/web-analytics/",+ category: "web-analytics",+ comparePath: "/compare/cloudflare-analytics",+ summary:+ "Free and cookieless, but it samples data, keeps six months of history, and has no custom events, goals, or funnels.",+ hubDescription: "Full-featured analytics beyond basic traffic metrics",+ pricing: {+ model: "Free",+ startingPrice: "Free",+ freeTier: "Free, with or without Cloudflare's proxy",+ notes: ["The dashboard covers the previous six months of data"],+ sourceUrl: "https://www.cloudflare.com/web-analytics/",+ verifiedOn: "2026-09-27",+ },+ features: {+ realtime: true,+ customEvents: false,+ funnels: false,+ userJourneys: false,+ goals: false,+ savedSegments: false,+ utmTracking: false,+ publicDashboards: false,+ sessionReplay: false,+ heatmaps: undefined,+ userProfiles: false,+ webVitals: true,+ errorTracking: false,+ globeView: false,+ autocapture: false,+ cookieFree: true,+ noPersonalData: true,+ dailyRotatingSalt: false,+ openSource: false,+ selfHostable: false,+ scriptSize: "N/A",+ bypassesAdBlockers: false,+ apiAccess: false,+ dataImportIntoRybbit: false,+ },+ },+ rybbit: {+ slug: "rybbit",+ name: "Rybbit",+ website: "https://rybbit.com",+ category: "web-analytics",+ license: "AGPL-3.0",+ summary:+ "Open source (AGPL-3.0) and cookieless, with funnels, journeys, error tracking, and Web Vitals on every plan and session replay on Pro.",+ pricing: {+ model: "Events-based pricing",+ // Prices mirror getFormattedPrice() in components/PricingSection.tsx.+ startingPrice: "$19/mo",+ startingPriceIncludes: "100k events/month",+ freeTier: false,+ trial: "7-day free trial; a card is collected at signup and nothing is charged until the trial ends",+ notes: [+ `Standard: up to ${STANDARD_SITE_LIMIT} sites and ${STANDARD_TEAM_LIMIT} team members, 3-year data retention`,+ "Pro from $39/mo adds session replay, 5-year data retention, and unlimited sites and team members",+ // Replay quota: limits.replays in server/src/lib/const.ts (10% of the event allowance).+ "Session replays are capped at 10% of the monthly event allowance (10,000 on the 100k tier)",+ "4 months free with annual billing",+ "Self-hosting is free (AGPL-3.0)",+ ],+ sourceUrl: "https://rybbit.com/pricing",+ verifiedOn: "2026-09-27",+ },+ features: {+ realtime: true,+ customEvents: true,+ funnels: true,+ userJourneys: true,+ goals: true,+ savedSegments: true,+ utmTracking: true,+ publicDashboards: true,+ sessionReplay: "Pro plan",+ heatmaps: false,+ userProfiles: true,+ webVitals: true,+ errorTracking: true,+ globeView: true,+ autocapture: true,+ cookieFree: true,+ noPersonalData: true,+ // Per-site setting (saltUserIds), off by default.+ dailyRotatingSalt: "Optional",+ openSource: true,+ selfHostable: true,+ scriptSize: "~18KB",+ // The script can be proxied through your own domain (/docs/proxy-guide).+ bypassesAdBlockers: "With proxy",+ apiAccess: true,+ dataImportIntoRybbit: undefined,+ },+ },+} satisfies Record<string, ProductEntry>;++export type ProductSlug = keyof typeof competitors;+export type CompetitorSlug = Exclude<ProductSlug, "rybbit">;++export const rybbit: ProductEntry = competitors.rybbit;++/** Competitors in hub order (every registry entry except Rybbit). */+export const competitorEntries: ProductEntry[] = Object.values(competitors).filter(entry => entry.slug !== "rybbit");++/** Competitors with a Rybbit-vs-X page, in hub order. */+export const comparedCompetitors = competitorEntries.filter(+ (entry): entry is ProductEntry & { comparePath: string } => entry.comparePath !== undefined+);++/** Competitors whose history Rybbit can import. */+export const importableCompetitors = competitorEntries.filter(entry => entry.features.dataImportIntoRybbit === true);diff --git a/docs/src/app/[locale]/(home)/compare/data/vsPairs.ts b/docs/src/app/[locale]/(home)/compare/data/vsPairs.tsnew file mode 100644index 000000000..87cc6a290--- /dev/null+++ b/docs/src/app/[locale]/(home)/compare/data/vsPairs.ts@@ -0,0 +1,303 @@+import {+ competitors,+ rybbit,+ type CompetitorSlug,+ type FeatureGroup,+ type FeatureKey,+ type FeatureValue,+} from "./competitors";++// Allowlist of "X vs Y" pages served at /compare/<slug>. Registry facts (feature table,+// pricing, names) come from ./competitors.ts; everything here is pair-specific copy. Every+// factual claim in a pair must be backed by a vendor page listed in its `sources`, checked on+// `verifiedOn`. Leave out anything you can't verify.++export interface VsExtraRow {+ label: string;+ group: FeatureGroup;+ /** Place the row after this canonical feature; otherwise it goes at the end of its group. */+ after?: FeatureKey;+ a: FeatureValue;+ b: FeatureValue;+ /** Rybbit's value; read it from the registry where one exists. */+ rybbit?: FeatureValue;+ /** Vendor pages that back the `a` and `b` values (they must also appear in `sources`). */+ sources: string[];+}++export interface VsFaqItem {+ question: string;+ answer: string;+}++export interface VsLink {+ title: string;+ href: string;+ description: string;+}++export interface VsSource {+ label: string;+ url: string;+}++export interface VsPair {+ slug: string;+ a: CompetitorSlug;+ b: CompetitorSlug;+ /** Page <title> before the " | Rybbit" suffix. At most 62 characters. */+ title: string;+ /** At most 160 characters. */+ metaDescription: string;+ /** One line for the /compare hub. */+ hubDescription: string;+ intro: string;+ /** `bestFor` completes the phrase "Best for …". */+ verdict: {+ summary: string;+ a: { bestFor: string; reason: string };+ b: { bestFor: string; reason: string };+ };+ chooseA: string[];+ chooseB: string[];+ /** Registry features shown in the table. Omit a feature when a vendor page contradicts the registry. */+ features: FeatureKey[];+ extraRows?: VsExtraRow[];+ tableNotes?: string[];+ /** Adds a "Rybbit (our product)" column to the feature table. */+ showRybbitColumn?: boolean;+ faq: VsFaqItem[];+ relatedPosts: VsLink[];+ sources: VsSource[];+ /** ISO date (YYYY-MM-DD) the pair copy was last checked against `sources`. */+ verifiedOn: string;+}++const MAX_TITLE_LENGTH = 62;+const MAX_DESCRIPTION_LENGTH = 160;++export const vsPairs: VsPair[] = [+ {+ slug: "matomo-vs-google-analytics",+ a: "matomo",+ b: "google-analytics",+ title: "Matomo vs Google Analytics: Privacy, Price, Features",+ metaDescription:+ "Matomo vs Google Analytics 4, with sources: self-hosting, cookies and consent, data sampling and retention, heatmaps, and what each costs in 2026.",+ hubDescription: "Unsampled, self-hostable analytics vs free GA4 with Google Ads built in",+ intro:+ "Matomo is open-source analytics you can run on your own servers or buy as an EU-hosted cloud. Google Analytics 4 is free and connects natively to Google Ads. Here's how they compare on privacy, data limits, features, and price.",+ verdict: {+ summary:+ "Pick Matomo if you need to control where your analytics data lives. Pick Google Analytics if you advertise on Google and want analytics at no cost.",+ a: {+ bestFor: "data ownership",+ reason:+ "Free to self-host, no data sampling, and a cloud hosted in Frankfurt. Configured for it, Matomo can run without consent in some EU countries, and it offers heatmaps and session recordings.",+ },+ b: {+ bestFor: "Google Ads on a zero budget",+ reason:+ "Free of charge and linked natively to Google Ads. The cost is control: two-year cookies that need consent where the law requires it, sampling above 10 million events per query, and at most 14 months of exploration data.",+ },+ },+ chooseA: [+ "You want analytics on your own servers: the On-Premise edition is free, open source (GPL), and has no limits on users or hits.",+ "You want EU hosting without running servers: Matomo Cloud stores data in Frankfurt, Germany.",+ "You need unsampled reports and long history: Matomo doesn't sample data, and Cloud keeps raw data for 24 months and reports forever.",+ "You want heatmaps, session recordings, or A/B tests in the same tool: they're included in Cloud and sold as paid plugins On-Premise.",+ "You're leaving GA and want your history: the free Google Analytics Importer brings over GA4 and Universal Analytics reports (aggregated, not raw visits).",+ "You need analytics that can run without consent in France, Spain, Italy, or the Netherlands, and accept the privacy-focused setup that requires (unique-visitor counts get less accurate).",+ ],+ chooseB: [+ "You advertise on Google: linking GA4 to Google Ads lets you build Ads conversions from your key events and re-engage visitors based on what they did on your site.",+ "You need analytics at no cost: standard GA4 is free of charge, and only Analytics 360 is paid.",+ "You want raw events in BigQuery: standard properties can export 1 million events a day in daily exports, and streaming export has no event limit (BigQuery bills for storage and queries).",+ "Your team already works in GA4 explorations: funnel, path, cohort, and user lifetime analysis are built in.",+ "You're fine running a consent banner: GA4's cookies need consent where the law requires it, and consent mode models the visitors who decline.",+ ],+ features: [+ "realtime",+ "customEvents",+ "funnels",+ "goals",+ "utmTracking",+ "sessionReplay",+ "cookieFree",+ "openSource",+ "selfHostable",+ "apiAccess",+ ],+ // userJourneys is shown as "User flows" instead: the registry's Matomo value (false, from+ // /compare/matomo) is contradicted by Users Flow on matomo.org/pricing.+ extraRows: [+ {+ label: "User flows",+ group: "analytics",+ after: "funnels",+ a: "Users Flow",+ b: "Path exploration",+ rybbit: rybbit.features.userJourneys,+ sources: ["https://matomo.org/pricing/", "https://support.google.com/analytics/answer/7579450"],+ },+ {+ label: "Heatmaps",+ group: "advanced",+ after: "sessionReplay",+ a: "Click, move & scroll",+ b: false,+ rybbit: rybbit.features.heatmaps,+ sources: [+ "https://plugins.matomo.org/HeatmapSessionRecording",+ "https://support.google.com/analytics/answer/7579450",+ ],+ },+ {+ label: "Data sampling",+ group: "technical",+ a: "None",+ b: "Above 10M events per query",+ rybbit: "None",+ sources: ["https://matomo.org/pricing/", "https://support.google.com/analytics/answer/13331292"],+ },+ {+ label: "Data retention",+ group: "technical",+ a: "Cloud: raw data 24 months, reports forever. Self-hosted: no limit",+ b: "Explorations: 2 or 14 months (up to 50 on 360)",+ // From the Standard and Pro plan lists in components/PricingSection.tsx.+ rybbit: "3 years (Standard), 5 years (Pro)",+ sources: ["https://matomo.org/pricing/", "https://support.google.com/analytics/answer/7667196"],+ },+ ],+ tableNotes: [+ "Matomo Cloud includes funnels, Users Flow, heatmaps, session recordings, and A/B testing, with monthly allowances for heatmaps and recordings. On Matomo On-Premise, these are paid plugins.",+ "Google Analytics values are for standard (free) GA4 properties. Analytics 360 raises limits such as the sampling threshold and data retention.",+ ],+ showRybbitColumn: true,+ faq: [+ {+ question: "Is Matomo better than Google Analytics?",+ answer:+ "It depends on what you need more. Matomo gives you control: you can self-host it or use its Frankfurt-hosted cloud, it doesn't sample data, and it offers heatmaps and session recordings. Google Analytics 4 is free and links natively to Google Ads, but it relies on cookies that need consent where the law requires it, samples queries above 10 million events, and keeps exploration data for at most 14 months on free properties.",+ },+ {+ question: "Is Matomo free?",+ answer:+ "Matomo On-Premise is free forever with unlimited users and hits, and it's open source under the GPL. You pay for your own server, and premium features such as heatmaps, session recordings, funnels, and A/B testing are paid plugins. Matomo Cloud is paid: for US visitors it starts at $26 a month for 50,000 hits, after a 21-day free trial that doesn't need a credit card.",+ },+ {+ question: "Is Google Analytics free?",+ answer:+ "Yes. Google says Google Analytics gives you its tools free of charge. The paid tier, Analytics 360, has no public price; Google sells it through its sales team, with service-level agreements, unsampled results, and higher limits.",+ },+ {+ question: "Do Matomo and Google Analytics need a cookie consent banner?",+ answer:+ "GA4 sets first-party cookies that last two years by default, and Google's terms require you to get consent for them wherever the law requires it; with consent mode, tags send cookieless pings for visitors who decline and Google models the gap. Matomo also uses first-party cookies by default, but it can run without cookies or personal data, and Matomo says that setup can be exempt from consent in France, Spain, Italy, and the Netherlands. For stricter regimes such as Germany, Matomo recommends treating JavaScript tracking as requiring consent.",+ },+ {+ question: "Can I move my Google Analytics data into Matomo?",+ answer:+ "Yes. Matomo's Google Analytics Importer is free and imports both GA4 and Universal Analytics properties. It brings over aggregated reports, not raw visits, so Matomo's Visitor Log, Custom Reports, and segmentation don't work on the imported periods.",+ },+ {+ question: "Does Google Analytics sample data? Does Matomo?",+ answer:+ 'GA4 may sample a report, exploration, or API request that covers more than 10 million events on a standard property; Analytics 360 starts at 100 million events per query and can go up to 1 billion. Matomo\'s pricing page lists "No data sampling" for every plan, Cloud and On-Premise.',+ },+ {+ question: "How long do Matomo and Google Analytics keep data?",+ answer:+ "Standard GA4 properties keep event-level data for 2 or 14 months, which limits explorations and funnel reports; standard aggregated reports aren't affected, and Analytics 360 allows up to 50 months. Matomo Cloud keeps raw data for 24 months and report data forever, and a self-hosted Matomo keeps whatever you store.",+ },+ {+ question: "Does Google Analytics have heatmaps or session recordings?",+ answer:+ "No. GA4's analysis tools are its reports and explorations (free form, funnel, path, segment overlap, cohort, user exploration, and user lifetime), with no heatmaps or recordings. Matomo has both: they're included in Matomo Cloud with monthly allowances (1,500 heatmap pageviews and 150 recordings at 50,000 hits) and are a paid plugin for On-Premise.",+ },+ ],+ relatedPosts: [+ {+ title: "How much does Google Analytics cost?",+ href: "/blog/google-analytics-pricing",+ description: "GA4's free limits, Analytics 360 pricing, and the hidden costs",+ },+ {+ title: "Best Google Analytics alternatives",+ href: "/blog/best-google-analytics-alternatives",+ description: "Nine GA4 alternatives compared on price, privacy, and features",+ },+ ],+ sources: [+ { label: "Matomo: Pricing (Cloud and On-Premise)", url: "https://matomo.org/pricing/" },+ { label: "Matomo: Cloud-hosted Matomo", url: "https://matomo.org/matomo-cloud/" },+ { label: "Matomo: How much does Matomo cost?", url: "https://matomo.org/faq/new-to-piwik/faq_145/" },+ {+ label: "Matomo: Using Matomo without consent or a cookie banner",+ url: "https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-without-consent-or-cookie-banner/",+ },+ {+ label: "Matomo: CNIL consent exemption",+ url: "https://matomo.org/faq/how-to/how-do-i-configure-matomo-without-tracking-consent-for-french-visitors-cnil-exemption/",+ },+ {+ label: "Matomo: Heatmap & Session Recording plugin",+ url: "https://plugins.matomo.org/HeatmapSessionRecording",+ },+ { label: "Matomo: Google Analytics Importer plugin", url: "https://plugins.matomo.org/GoogleAnalyticsImporter" },+ {+ label: "Matomo: Running the Google Analytics import",+ url: "https://matomo.org/faq/general/running-the-google-analytics-import/",+ },+ {+ label: "Matomo: Limitations of imported Google Analytics data",+ url: "https://matomo.org/faq/general/limitations-when-importing-google-analytics-data/",+ },+ { label: "Google: Google Analytics", url: "https://marketingplatform.google.com/about/analytics/" },+ { label: "Google: Analytics 360", url: "https://marketingplatform.google.com/about/analytics-360/" },+ {+ label: "Google: Analytics Terms of Service",+ url: "https://marketingplatform.google.com/about/analytics/terms/us/",+ },+ { label: "Google: Cookie usage on websites", url: "https://support.google.com/analytics/answer/11397207" },+ { label: "Google: Consent mode", url: "https://support.google.com/analytics/answer/9976101" },+ { label: "Google: About data sampling", url: "https://support.google.com/analytics/answer/13331292" },+ { label: "Google: Data retention", url: "https://support.google.com/analytics/answer/7667196" },+ { label: "Google: Get started with Explorations", url: "https://support.google.com/analytics/answer/7579450" },+ { label: "Google: Realtime report", url: "https://support.google.com/analytics/answer/9271392" },+ { label: "Google: Key events", url: "https://support.google.com/analytics/answer/13128484" },+ { label: "Google: Connect Google Ads to Analytics", url: "https://support.google.com/analytics/answer/9379420" },+ { label: "Google: Set up BigQuery Export", url: "https://support.google.com/analytics/answer/9823238" },+ ],+ verifiedOn: "2026-09-27",+ },+];++// Fail the build on copy that breaks the SERP limits or cites an unlisted source.+for (const pair of vsPairs) {+ const problems: string[] = [];+ if (!pair.slug.includes("-vs-")) problems.push("slug must contain -vs-");+ if (pair.a === pair.b) problems.push("a and b must differ");+ if (pair.title.length > MAX_TITLE_LENGTH)+ problems.push(`title is ${pair.title.length} chars (max ${MAX_TITLE_LENGTH})`);+ if (pair.metaDescription.length > MAX_DESCRIPTION_LENGTH) {+ problems.push(`meta description is ${pair.metaDescription.length} chars (max ${MAX_DESCRIPTION_LENGTH})`);+ }+ const sourceUrls = new Set(pair.sources.map(source => source.url));+ for (const row of pair.extraRows ?? []) {+ for (const url of row.sources) {+ if (!sourceUrls.has(url)) problems.push(`row "${row.label}" cites ${url}, which isn't in sources`);+ }+ }+ if (problems.length > 0) throw new Error(`Invalid vs pair "${pair.slug}": ${problems.join("; ")}`);+}++export function getVsPair(slug: string): VsPair | undefined {+ return vsPairs.find(pair => pair.slug === slug);+}++/** Display name for a pair, e.g. "Matomo vs Google Analytics". */+export function vsPairName(pair: VsPair): string {+ return `${competitors[pair.a].name} vs ${competitors[pair.b].name}`;+}diff --git a/docs/src/app/[locale]/(home)/compare/page.tsx b/docs/src/app/[locale]/(home)/compare/page.tsxindex 50cdb2604..dbb9ca659 100644--- a/docs/src/app/[locale]/(home)/compare/page.tsx+++ b/docs/src/app/[locale]/(home)/compare/page.tsx@@ -4,6 +4,8 @@ import { createOGImageUrl } from "@/lib/metadata";import { ArrowRight } from "lucide-react";import type { Metadata } from "next";import Link from "next/link";+import { comparedCompetitors } from "./data/competitors";+import { vsPairName, vsPairs } from "./data/vsPairs";export const metadata: Metadata = {title: "Rybbit vs The Competition: Analytics Alternatives Compared",@@ -41,48 +43,12 @@ export const metadata: Metadata = {},};-const competitors = [- {- name: "Google Analytics",- slug: "google-analytics",- description: "Privacy-first alternative to the most popular analytics platform",- },- {- name: "Plausible",- slug: "plausible",- description: "More features with the same privacy-first approach",- },- {- name: "PostHog",- slug: "posthog",- description: "Focused web analytics vs a full product suite",- },- {- name: "Umami",- slug: "umami",- description: "Advanced features on top of open-source simplicity",- },- {- name: "Fathom",- slug: "fathom",- description: "Open-source transparency with deeper analytics",- },- {- name: "Simple Analytics",- slug: "simpleanalytics",- description: "Feature-rich analytics without sacrificing privacy",- },- {- name: "Matomo",- slug: "matomo",- description: "Modern alternative to the legacy PHP analytics platform",- },- {- name: "Cloudflare Analytics",- slug: "cloudflare-analytics",- description: "Full-featured analytics beyond basic traffic metrics",- },-];+// Names, card text, and order come from the competitor registry (data/competitors.ts).+const competitors = comparedCompetitors.flatMap((competitor) =>+ competitor.hubDescription+ ? [{ name: competitor.name, href: competitor.comparePath, description: competitor.hubDescription }]+ : []+);const guides = [{@@ -112,7 +78,7 @@ const structuredData = {"@type": "ListItem",position: i + 1,name: `Rybbit vs ${c.name}`,- url: `https://rybbit.com/compare/${c.slug}`,+ url: `https://rybbit.com${c.href}`,})),};@@ -146,8 +112,8 @@ export default function ComparePage() {<div className="grid gap-px bg-neutral-200 dark:bg-neutral-800 lg:col-span-8 md:grid-cols-2">{competitors.map((competitor) => (<Link- key={competitor.slug}- href={`/compare/${competitor.slug}`}+ key={competitor.href}+ href={competitor.href}className="group flex min-h-48 flex-col justify-between bg-white px-5 py-9 transition-colors hover:bg-neutral-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-neutral-500 dark:bg-neutral-950 dark:hover:bg-neutral-900/60 sm:px-8 lg:px-10"><div>@@ -164,6 +130,36 @@ export default function ComparePage() {</div></section>+ {vsPairs.length > 0 && (+ <section className="border-b border-neutral-200 dark:border-neutral-800" aria-labelledby="comparison-pairs-title">+ <div className="mx-auto grid max-w-[1200px] grid-cols-1 border-x border-neutral-200 dark:border-neutral-800 lg:grid-cols-12">+ <div className="border-b border-neutral-200 px-5 py-12 dark:border-neutral-800 sm:px-8 lg:col-span-4 lg:border-b-0 lg:border-r lg:px-10 lg:py-16">+ <div className="lg:sticky lg:top-24">+ <h2 id="comparison-pairs-title" className="text-3xl font-semibold tracking-[-0.03em] md:text-4xl">+ Head-to-head comparisons+ </h2>+ <p className="mt-5 max-w-sm text-base leading-7 text-neutral-600 dark:text-neutral-400">+ Choosing between two other tools? These pages compare them directly, with a source for every claim.+ </p>+ </div>+ </div>+ <div className="lg:col-span-8">+ {vsPairs.map((pair) => (+ <Link+ key={pair.slug}+ href={`/compare/${pair.slug}`}+ className="group grid border-b border-neutral-200 px-5 py-7 last:border-b-0 transition-colors hover:bg-neutral-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-neutral-500 dark:border-neutral-800 dark:hover:bg-neutral-900/60 sm:grid-cols-[minmax(0,0.8fr)_minmax(0,1.2fr)_auto] sm:items-center sm:gap-6 sm:px-8 lg:px-10"+ >+ <span className="font-semibold">{vsPairName(pair)}</span>+ <span className="mt-1 text-sm leading-6 text-neutral-500 dark:text-neutral-400 sm:mt-0">{pair.hubDescription}</span>+ <ArrowRight className="mt-4 size-4 text-neutral-400 transition-transform group-hover:translate-x-1 sm:mt-0" aria-hidden="true" />+ </Link>+ ))}+ </div>+ </div>+ </section>+ )}+<section className="border-b border-neutral-200 dark:border-neutral-800" aria-labelledby="comparison-guides-title"><div className="mx-auto grid max-w-[1200px] border-x border-neutral-200 dark:border-neutral-800 lg:grid-cols-12"><div className="border-b border-neutral-200 px-5 py-12 dark:border-neutral-800 sm:px-8 lg:col-span-4 lg:border-b-0 lg:border-r lg:px-10 lg:py-16">diff --git a/docs/src/app/sitemap.ts b/docs/src/app/sitemap.tsindex ca130786a..294404553 100644--- a/docs/src/app/sitemap.ts+++ b/docs/src/app/sitemap.ts@@ -1,6 +1,8 @@import { MetadataRoute } from "next";import { source } from "@/lib/source";import { blogSource } from "@/lib/blog-source";+import { comparedCompetitors } from "@/app/[locale]/(home)/compare/data/competitors";+import { vsPairs } from "@/app/[locale]/(home)/compare/data/vsPairs";import { socialMediaToolSlugs } from "@/app/[locale]/(home)/tools/(social-media-tools)/components/social-tool-slugs";import { routing } from "@/i18n/routing";import { readdirSync } from "fs";@@ -79,17 +81,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {})),];- // Comparison pages- const competitors = [- "google-analytics",- "plausible",- "posthog",- "umami",- "fathom",- "simpleanalytics",- "matomo",- "cloudflare-analytics",- ];+ // Comparison pages: Rybbit-vs-X pages and "X vs Y" pairs, both from the compare registryconst comparisonPages = [{url: `${baseUrl}/compare`,@@ -97,12 +89,18 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {changeFrequency: "monthly" as const,priority: 0.8,},- ...competitors.map(slug => ({- url: `${baseUrl}/compare/${slug}`,+ ...comparedCompetitors.map(competitor => ({+ url: `${baseUrl}${competitor.comparePath}`,lastModified: new Date(),changeFrequency: "monthly" as const,priority: 0.8,})),+ ...vsPairs.map(pair => ({+ url: `${baseUrl}/compare/${pair.slug}`,+ lastModified: new Date(pair.verifiedOn),+ changeFrequency: "monthly" as const,+ priority: 0.8,+ })),];// Static pages