🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Remove contact and privacy policy documentation files to streamline content and focus on essential resources.
Bill Yang494d7a1b3e8f
diff --git a/docs-v2/content/docs/contact.mdx b/docs-v2/content/docs/contact.mdxdeleted file mode 100644index 97c9ce6d1..000000000--- a/docs-v2/content/docs/contact.mdx+++ /dev/null@@ -1,44 +0,0 @@-----title: Contact-description: Get in touch with the Rybbit team------import { Callout } from 'fumadocs-ui/components/callout';--# Contact Us--Have questions about Rybbit? We're here to help! Reach out to us through any of these channels:--## Communication Channels--Reach us directly at [[email protected]](https://www.rybbit.io/contact) for general inquiries, support, or business discussions.--### GitHub-For bug reports, feature requests, and technical discussions, visit our repository at [github.com/rybbit-io/rybbit](https://github.com/rybbit-io/rybbit).--### Discord-Join our community on [Discord](https://discord.gg/DEhGb4hYBj) to chat with other Rybbit users and the development team.--### X (Twitter)-Follow us on X at [@yang_frog](https://x.com/yang_frog) for updates and announcements.--## White-Labeling & Custom Solutions--<Callout>-Looking to white-label Rybbit for your organization or need a custom analytics solution? We offer tailored implementations to meet your specific requirements.-</Callout>--Contact us at [[email protected]](mailto:[email protected]) to discuss your needs.--## Open Source Contributions--Rybbit is an open-source project. If you'd like to contribute, report issues, or suggest features, please visit our [GitHub repository](https://github.com/rybbit-io/rybbit).--We welcome:-- Bug reports and feature requests-- Code contributions via pull requests-- Documentation improvements-- Community support and engagement--Visit our [GitHub Repository](https://github.com/rybbit-io/rybbit) to get started contributing!\ No newline at end of filediff --git a/docs-v2/content/docs/privacy.mdx b/docs-v2/content/docs/privacy.mdxdeleted file mode 100644index 318f65b23..000000000--- a/docs-v2/content/docs/privacy.mdx+++ /dev/null@@ -1,79 +0,0 @@-----title: Privacy Policy-description: Rybbit privacy policy - how we protect your data------# Privacy Policy--Last updated: {new Date().toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })}--## Overview--Rybbit is an open-source, privacy-friendly web analytics alternative to Google Analytics. This privacy policy explains our approach to data collection and how we prioritize user privacy while still providing website owners with valuable insights.--## Data We Collect--Rybbit collects the following anonymous data about website visits:--- **Page data:** URLs visited, page titles, referrers, and query parameters-- **Visit information:** Session duration, entry and exit pages-- **Device information:** Browser type and version, operating system, screen resolution, device type-- **Location data:** Country and region (derived from IP address, which is not stored)-- **Marketing data:** UTM parameters (source, medium, campaign)-- **Custom events:** If configured by the website owner--## How We Process IPs--When processing visitor data, IP addresses are only used temporarily to determine geographic location (country and region). The actual IP addresses are never stored in our database, preserving visitor anonymity while still providing geographic insights to website owners.--## User and Session IDs--Rybbit uses anonymous session and user identifiers that contain no personally identifiable information. These IDs help track user journeys and session information without compromising privacy or requiring cookies.--## No Cookies Policy--Unlike traditional analytics tools, Rybbit functions without cookies. This means websites using Rybbit typically don't require cookie consent banners under GDPR, ePrivacy Directive, and similar regulations.--## How Data is Used--The collected data is used exclusively to:--- Provide website owners with anonymous, aggregated statistics about their visitors-- Show trends in website traffic and user behavior-- Help identify popular content and effective referral sources-- Track marketing campaign performance-- Understand user flows through websites--## Data Ownership--For self-hosted Rybbit instances, all collected data remains exclusively on your servers and under your control. For our cloud service, you retain ownership of your analytics data, and we process it solely to provide the analytics service to you.--## Data Retention--For self-hosted instances, data retention is configurable by the administrator. For our cloud service, we retain analytics data for 12 months by default, after which it is automatically deleted.--## GDPR and Privacy Regulations Compliance--Rybbit is designed with privacy regulations in mind, including GDPR, CCPA, and ePrivacy Directive:--- We collect minimal data needed for analytics-- We don't use cookies or local storage-- We don't track users across different websites-- We don't collect or store personal data that could directly identify individuals-- We don't share or sell your analytics data--## Security Measures--For our cloud service, we implement appropriate technical and organizational security measures to protect your data. For self-hosted instances, security is managed by your administrators.--## Changes to This Policy--We may update this Privacy Policy periodically to reflect changes in our practices or for legal reasons. We will post the updated policy on this page with a revised date.--## Open Source Transparency--As an open-source project, our code is publicly available for review. This includes our data collection mechanisms, which you can audit to verify our privacy claims. [View our GitHub repository](https://github.com/rybbit-io/rybbit).--## Contact Us--If you have questions about this privacy policy or Rybbit's data practices, please contact us at: [[email protected]](https://www.rybbit.io/contact)\ No newline at end of filediff --git a/docs-v2/src/app/(home)/layout.tsx b/docs-v2/src/app/(home)/layout.tsxindex 5ce3735ed..e41709a02 100644--- a/docs-v2/src/app/(home)/layout.tsx+++ b/docs-v2/src/app/(home)/layout.tsx@@ -2,24 +2,9 @@ import type { ReactNode } from "react";import { CustomHeader } from "@/components/CustomHeader";import { Footer } from "@/components/Footer";-const isDev = process.env.NODE_ENV === "development";-export default function Layout({ children }: { children: ReactNode }) {return (<>- <script- src="https://demo.rybbit.io/api/script.js"- data-site-id="21"- defer- data-session-replay="true"- data-web-vitals="true"- data-track-errors="true"- data-track-outbound="true"- {...(isDev && {- "data-api-key": process.env.NEXT_PUBLIC_RYBBIT_API_KEY,- })}- ></script>- <script async src="https://scripts.simpleanalyticscdn.com/latest.js"></script><CustomHeader /><main className="flex-1">{children}</main><Footer />diff --git a/docs-v2/src/app/contact/layout.tsx b/docs-v2/src/app/contact/layout.tsxnew file mode 100644index 000000000..e41709a02--- /dev/null+++ b/docs-v2/src/app/contact/layout.tsx@@ -0,0 +1,13 @@+import type { ReactNode } from "react";+import { CustomHeader } from "@/components/CustomHeader";+import { Footer } from "@/components/Footer";++export default function Layout({ children }: { children: ReactNode }) {+ return (+ <>+ <CustomHeader />+ <main className="flex-1">{children}</main>+ <Footer />+ </>+ );+}diff --git a/docs-v2/src/app/contact/page.tsx b/docs-v2/src/app/contact/page.tsxnew file mode 100644index 000000000..cbcae7394--- /dev/null+++ b/docs-v2/src/app/contact/page.tsx@@ -0,0 +1,114 @@+import Link from "next/link";+import { Mail, Github, Bell, Twitter } from "lucide-react";++export const metadata = {+ title: "Contact",+ description: "Get in touch with the Rybbit team",+};++export default function Contact() {+ return (+ <div className="max-w-4xl mx-auto px-4 py-12">+ <h1 className="text-3xl md:text-4xl font-bold mb-8">Contact Us</h1>++ <div className="bg-neutral-800/20 border border-neutral-700/50 rounded-xl p-6 md:p-8 mb-8">+ <p className="text-lg mb-6">+ Have questions about Rybbit? We're here to help! Reach out to us through any of these channels:+ </p>++ <div className="space-y-6">+ <div className="flex items-start md:items-center gap-4 flex-col md:flex-row">+ <div className="bg-neutral-800 p-3 rounded-lg">+ <Mail className="w-6 h-6 text-neutral-300" />+ </div>+ <div>+ <h2 className="text-xl font-medium mb-1">Email</h2>+ <a href="https://www.rybbit.io/contact" className="text-neutral-300 hover:text-white transition-colors">+ </a>+ </div>+ </div>++ <div className="flex items-start md:items-center gap-4 flex-col md:flex-row">+ <div className="bg-neutral-800 p-3 rounded-lg">+ <Github className="w-6 h-6 text-neutral-300" />+ </div>+ <div>+ <h2 className="text-xl font-medium mb-1">GitHub</h2>+ <a+ href="https://github.com/rybbit-io/rybbit"+ target="_blank"+ rel="noopener noreferrer"+ className="text-neutral-300 hover:text-white transition-colors"+ >+ github.com/rybbit-io/rybbit+ </a>+ </div>+ </div>++ <div className="flex items-start md:items-center gap-4 flex-col md:flex-row">+ <div className="bg-neutral-800 p-3 rounded-lg">+ <Bell className="w-6 h-6 text-neutral-300" />+ </div>+ <div>+ <h2 className="text-xl font-medium mb-1">Discord</h2>+ <a+ href="https://discord.gg/DEhGb4hYBj"+ target="_blank"+ rel="noopener noreferrer"+ className="text-neutral-300 hover:text-white transition-colors"+ >+ Join our Discord Server+ </a>+ </div>+ </div>++ <div className="flex items-start md:items-center gap-4 flex-col md:flex-row">+ <div className="bg-neutral-800 p-3 rounded-lg">+ <Twitter className="w-6 h-6 text-neutral-300" />+ </div>+ <div>+ <h2 className="text-xl font-medium mb-1">X (Twitter)</h2>+ <a+ href="https://x.com/yang_frog"+ target="_blank"+ rel="noopener noreferrer"+ className="text-neutral-300 hover:text-white transition-colors"+ >+ @yang_frog+ </a>+ </div>+ </div>+ </div>+ </div>++ <div className="bg-neutral-800/30 border border-neutral-700/50 rounded-xl p-6 mb-8">+ <h2 className="text-xl font-medium mb-3">White-Labeling & Custom Solutions</h2>+ <p className="mb-4">+ Looking to white-label Rybbit for your organization or need a custom analytics solution? We offer tailored+ implementations to meet your specific requirements.+ </p>+ <p className="mb-4">+ Contact us at{" "}+ <a href="mailto:[email protected]" className="text-neutral-300 hover:text-white transition-colors underline">+ </a>{" "}+ to discuss your needs.+ </p>+ </div>++ <div className="bg-neutral-800/30 border border-neutral-700/50 rounded-xl p-6">+ <h2 className="text-xl font-medium mb-3">Open Source Contributions</h2>+ <p className="mb-4">+ Rybbit is an open-source project. If you'd like to contribute, report issues, or suggest features, please+ visit our GitHub repository.+ </p>+ <Link href="https://github.com/rybbit-io/rybbit" target="_blank" rel="noopener noreferrer">+ <button className="bg-neutral-800 hover:bg-neutral-700 text-white font-medium px-5 py-2 rounded-lg border border-neutral-700 transform hover:-translate-y-0.5 transition-all duration-200 hover:border-neutral-600 focus:outline-none focus:ring-2 focus:ring-neutral-600 focus:ring-opacity-50 cursor-pointer">+ Visit GitHub Repository+ </button>+ </Link>+ </div>+ </div>+ );+}diff --git a/docs-v2/src/app/layout.tsx b/docs-v2/src/app/layout.tsxindex ec2358938..5c4e9bd7e 100644--- a/docs-v2/src/app/layout.tsx+++ b/docs-v2/src/app/layout.tsx@@ -4,7 +4,7 @@ import { Inter } from "next/font/google";import type { ReactNode } from "react";import type { Metadata } from "next";-const inter = Inter({+const inter = Inter({subsets: ["latin"],variable: "--font-inter",});@@ -12,10 +12,18 @@ const inter = Inter({export const metadata: Metadata = {title: {default: "Rybbit - Privacy-First Web Analytics Platform",- template: "%s | Rybbit"+ template: "%s | Rybbit",},- description: "Open-source, privacy-focused web analytics platform. Track your website performance without compromising user privacy. Self-hostable alternative to Google Analytics.",- keywords: ["web analytics", "privacy analytics", "open source analytics", "Google Analytics alternative", "website tracking", "self-hosted analytics"],+ description:+ "Open-source, privacy-focused web analytics platform. Track your website performance without compromising user privacy. Self-hostable alternative to Google Analytics.",+ keywords: [+ "web analytics",+ "privacy analytics",+ "open source analytics",+ "Google Analytics alternative",+ "website tracking",+ "self-hosted analytics",+ ],authors: [{ name: "Rybbit Team" }],creator: "Rybbit",publisher: "Rybbit",@@ -26,22 +34,24 @@ export const metadata: Metadata = {url: "https://rybbit.io",siteName: "Rybbit",title: "Rybbit - Privacy-First Web Analytics Platform",- description: "Open-source, privacy-focused web analytics platform. Track your website performance without compromising user privacy.",+ description:+ "Open-source, privacy-focused web analytics platform. Track your website performance without compromising user privacy.",images: [{url: "/opengraph-image.png",width: 1200,height: 630,- alt: "Rybbit Analytics Dashboard"- }- ]+ alt: "Rybbit Analytics Dashboard",+ },+ ],},twitter: {card: "summary_large_image",title: "Rybbit - Privacy-First Web Analytics Platform",- description: "Open-source, privacy-focused web analytics platform. Track your website performance without compromising user privacy.",+ description:+ "Open-source, privacy-focused web analytics platform. Track your website performance without compromising user privacy.",images: ["/opengraph-image.png"],- creator: "@rybbitio"+ creator: "@rybbitio",},robots: {index: true,@@ -51,25 +61,40 @@ export const metadata: Metadata = {follow: true,"max-video-preview": -1,"max-image-preview": "large",- "max-snippet": -1- }+ "max-snippet": -1,+ },},verification: {google: "",yandex: "",- yahoo: ""- }+ yahoo: "",+ },};+const isDev = process.env.NODE_ENV === "development";+export default function Layout({ children }: { children: ReactNode }) {return (<html lang="en" suppressHydrationWarning className="dark">+ <script+ src="https://demo.rybbit.io/api/script.js"+ data-site-id="21"+ defer+ data-session-replay="true"+ data-web-vitals="true"+ data-track-errors="true"+ data-track-outbound="true"+ {...(isDev && {+ "data-api-key": process.env.NEXT_PUBLIC_RYBBIT_API_KEY,+ })}+ ></script>+ <script async src="https://scripts.simpleanalyticscdn.com/latest.js"></script><body className={`flex flex-col min-h-screen ${inter.variable} font-sans`}>- <RootProvider+ <RootProvidertheme={{forcedTheme: "dark",defaultTheme: "dark",- enabled: false+ enabled: false,}}>{children}diff --git a/docs-v2/src/app/privacy/layout.tsx b/docs-v2/src/app/privacy/layout.tsxnew file mode 100644index 000000000..e41709a02--- /dev/null+++ b/docs-v2/src/app/privacy/layout.tsx@@ -0,0 +1,13 @@+import type { ReactNode } from "react";+import { CustomHeader } from "@/components/CustomHeader";+import { Footer } from "@/components/Footer";++export default function Layout({ children }: { children: ReactNode }) {+ return (+ <>+ <CustomHeader />+ <main className="flex-1">{children}</main>+ <Footer />+ </>+ );+}diff --git a/docs-v2/src/app/privacy/page.tsx b/docs-v2/src/app/privacy/page.tsxnew file mode 100644index 000000000..a1f4b8450--- /dev/null+++ b/docs-v2/src/app/privacy/page.tsx@@ -0,0 +1,131 @@+export const metadata = {+ title: "Privacy Policy",+ description: "Rybbit privacy policy - how we protect your data",+};++export default function PrivacyPolicy() {+ return (+ <div className="max-w-4xl mx-auto px-4 py-12">+ <h1 className="text-3xl md:text-4xl font-bold mb-8">Privacy Policy</h1>++ <div className="prose prose-invert max-w-none">+ <p className="text-lg">+ Last updated: {new Date().toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric" })}+ </p>++ <h2 className="text-2xl font-semibold mt-8 mb-4">Overview</h2>+ <p>+ Rybbit is an open-source, privacy-friendly web analytics alternative to Google Analytics. This privacy policy+ explains our approach to data collection and how we prioritize user privacy while still providing website+ owners with valuable insights.+ </p>++ <h2 className="text-2xl font-semibold mt-8 mb-4">Data We Collect</h2>+ <p>Rybbit collects the following anonymous data about website visits:</p>+ <ul className="list-disc pl-6 space-y-2">+ <li>+ <strong>Page data:</strong> URLs visited, page titles, referrers, and query parameters+ </li>+ <li>+ <strong>Visit information:</strong> Session duration, entry and exit pages+ </li>+ <li>+ <strong>Device information:</strong> Browser type and version, operating system, screen resolution, device+ type+ </li>+ <li>+ <strong>Location data:</strong> Country and region (derived from IP address, which is not stored)+ </li>+ <li>+ <strong>Marketing data:</strong> UTM parameters (source, medium, campaign)+ </li>+ <li>+ <strong>Custom events:</strong> If configured by the website owner+ </li>+ </ul>++ <h2 className="text-2xl font-semibold mt-8 mb-4">How We Process IPs</h2>+ <p>+ When processing visitor data, IP addresses are only used temporarily to determine geographic location (country+ and region). The actual IP addresses are never stored in our database, preserving visitor anonymity while+ still providing geographic insights to website owners.+ </p>++ <h2 className="text-2xl font-semibold mt-8 mb-4">User and Session IDs</h2>+ <p>+ Rybbit uses anonymous session and user identifiers that contain no personally identifiable information. These+ IDs help track user journeys and session information without compromising privacy or requiring cookies.+ </p>++ <h2 className="text-2xl font-semibold mt-8 mb-4">No Cookies Policy</h2>+ <p>+ Unlike traditional analytics tools, Rybbit functions without cookies. This means websites using Rybbit+ typically don't require cookie consent banners under GDPR, ePrivacy Directive, and similar regulations.+ </p>++ <h2 className="text-2xl font-semibold mt-8 mb-4">How Data is Used</h2>+ <p>The collected data is used exclusively to:</p>+ <ul className="list-disc pl-6 space-y-2">+ <li>Provide website owners with anonymous, aggregated statistics about their visitors</li>+ <li>Show trends in website traffic and user behavior</li>+ <li>Help identify popular content and effective referral sources</li>+ <li>Track marketing campaign performance</li>+ <li>Understand user flows through websites</li>+ </ul>++ <h2 className="text-2xl font-semibold mt-8 mb-4">Data Ownership</h2>+ <p>+ For self-hosted Rybbit instances, all collected data remains exclusively on your servers and under your+ control. For our cloud service, you retain ownership of your analytics data, and we process it solely to+ provide the analytics service to you.+ </p>++ <h2 className="text-2xl font-semibold mt-8 mb-4">Data Retention</h2>+ <p>+ For self-hosted instances, data retention is configurable by the administrator. For our cloud service, we+ retain analytics data for 12 months by default, after which it is automatically deleted.+ </p>++ <h2 className="text-2xl font-semibold mt-8 mb-4">GDPR and Privacy Regulations Compliance</h2>+ <p>Rybbit is designed with privacy regulations in mind, including GDPR, CCPA, and ePrivacy Directive:</p>+ <ul className="list-disc pl-6 space-y-2">+ <li>We collect minimal data needed for analytics</li>+ <li>We don't use cookies or local storage</li>+ <li>We don't track users across different websites</li>+ <li>We don't collect or store personal data that could directly identify individuals</li>+ <li>We don't share or sell your analytics data</li>+ </ul>++ <h2 className="text-2xl font-semibold mt-8 mb-4">Security Measures</h2>+ <p>+ For our cloud service, we implement appropriate technical and organizational security measures to protect your+ data. For self-hosted instances, security is managed by your administrators.+ </p>++ <h2 className="text-2xl font-semibold mt-8 mb-4">Changes to This Policy</h2>+ <p>+ We may update this Privacy Policy periodically to reflect changes in our practices or for legal reasons. We+ will post the updated policy on this page with a revised date.+ </p>++ <h2 className="text-2xl font-semibold mt-8 mb-4">Open Source Transparency</h2>+ <p>+ As an open-source project, our code is publicly available for review. This includes our data collection+ mechanisms, which you can audit to verify our privacy claims.+ <a href="https://github.com/rybbit-io/rybbit" className="text-emerald-400 hover:text-emerald-300 ml-1">+ View our GitHub repository+ </a>+ .+ </p>++ <h2 className="text-2xl font-semibold mt-8 mb-4">Contact Us</h2>+ <p>+ If you have questions about this privacy policy or Rybbit's data practices, please contact us at:+ <a href="https://www.rybbit.io/contact" className="text-emerald-400 hover:text-emerald-300 ml-1">+ </a>+ </p>+ </div>+ </div>+ );+}diff --git a/server/src/analytics-script/config.ts b/server/src/analytics-script/config.tsindex 04981119f..daf276ac8 100644--- a/server/src/analytics-script/config.ts+++ b/server/src/analytics-script/config.ts@@ -4,9 +4,7 @@ import { parseJsonSafely } from "./utils.js";/*** Parse script configuration from the script tag attributes*/-export function parseScriptConfig(- scriptTag: HTMLScriptElement-): ScriptConfig | null {+export function parseScriptConfig(scriptTag: HTMLScriptElement): ScriptConfig | null {const src = scriptTag.getAttribute("src");if (!src) {console.error("Script src attribute is missing");@@ -19,12 +17,9 @@ export function parseScriptConfig(return null;}- const siteId =- scriptTag.getAttribute("data-site-id") || scriptTag.getAttribute("site-id");+ const siteId = scriptTag.getAttribute("data-site-id") || scriptTag.getAttribute("site-id");if (!siteId || isNaN(Number(siteId))) {- console.error(- "Please provide a valid site ID using the data-site-id attribute"- );+ console.error("Please provide a valid site ID using the data-site-id attribute");return null;}@@ -32,46 +27,31 @@ export function parseScriptConfig(? Math.max(0, parseInt(scriptTag.getAttribute("data-debounce")!)): 500;- const skipPatterns = parseJsonSafely<string[]>(- scriptTag.getAttribute("data-skip-patterns"),- []- );+ const skipPatterns = parseJsonSafely<string[]>(scriptTag.getAttribute("data-skip-patterns"), []);- const maskPatterns = parseJsonSafely<string[]>(- scriptTag.getAttribute("data-mask-patterns"),- []- );+ const maskPatterns = parseJsonSafely<string[]>(scriptTag.getAttribute("data-mask-patterns"), []);const apiKey = scriptTag.getAttribute("data-api-key") || undefined;- const sessionReplayBatchSize = scriptTag.getAttribute(- "data-replay-batch-size"- )+ const sessionReplayBatchSize = scriptTag.getAttribute("data-replay-batch-size")? Math.max(1, parseInt(scriptTag.getAttribute("data-replay-batch-size")!)): 250; // Industry standard batch size- const sessionReplayBatchInterval = scriptTag.getAttribute(- "data-replay-batch-interval"- )- ? Math.max(- 1000,- parseInt(scriptTag.getAttribute("data-replay-batch-interval")!)- )+ const sessionReplayBatchInterval = scriptTag.getAttribute("data-replay-batch-interval")+ ? Math.max(1000, parseInt(scriptTag.getAttribute("data-replay-batch-interval")!)): 5000; // 5 seconds - industry standard intervalreturn {analyticsHost,siteId,debounceDuration,- autoTrackPageview:- scriptTag.getAttribute("data-auto-track-pageview") !== "false",+ autoTrackPageview: scriptTag.getAttribute("data-auto-track-pageview") !== "false",autoTrackSpa: scriptTag.getAttribute("data-track-spa") !== "false",trackQuerystring: scriptTag.getAttribute("data-track-query") !== "false",trackOutbound: scriptTag.getAttribute("data-track-outbound") !== "false",enableWebVitals: scriptTag.getAttribute("data-web-vitals") === "true",trackErrors: scriptTag.getAttribute("data-track-errors") === "true",- enableSessionReplay:- scriptTag.getAttribute("data-session-replay") === "true",+ enableSessionReplay: scriptTag.getAttribute("data-session-replay") === "true",sessionReplayBatchSize,sessionReplayBatchInterval,skipPatterns,