Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Enhance documentation and components for self-hosting and troubleshooting

Bill Yang0dd6a6fb75bf
diff --git a/docs/content/docs/index.mdx b/docs/content/docs/index.mdx
index f04d0b1fb..eace156f3 100644
--- a/docs/content/docs/index.mdx
+++ b/docs/content/docs/index.mdx
@@ -5,6 +5,7 @@ description: Introduction to Rybbit
import { Cards, Card } from 'fumadocs-ui/components/card';
import Image from 'next/image';
+import { Check, X, AlertTriangle } from 'lucide-react';
import {
SiAngular,
SiAstro,
@@ -16,7 +17,7 @@ import {
SiJekyll,
SiLaravel,
SiMintlify,
- SiReact,
+ SiReact,
SiNextdotjs,
SiGatsby,
SiRemix,
@@ -61,26 +62,26 @@ See how Rybbit compares to other analytics solutions:
| Feature | Rybbit | GA4 | Plausible | Cloudflare |
| ------------------------ | ------- | ---------- | ---------- | ---------- |
-| **Open Source** | βœ… | ❌ | βœ… | ❌ |
-| **Self-Hosting** | βœ… | ❌ | βœ…\* | ❌ |
-| **Cookieless & Privacy friendly** | βœ… | ❌ | βœ… | βœ… |
-| **Advanced Maps** | βœ… | ❌ | ❌ | ❌ |
-| **Advanced Filters** | βœ… | ⚠️ Limited | ⚠️ Limited | ❌ |
-| **Web Vitals** | ⚠️ Paid | ❌ | ❌ | ❌ |
-| **Session Details** | βœ… | ❌ | ❌ | ❌ |
-| **User Profiles** | βœ… | ❌ | ❌ | ❌ |
-| **Session Replays** | βœ… | ❌ | ❌ | ❌ |
-| **Funnels** | βœ… | βœ… | ⚠️ Paid | ❌ |
-| **User Journeys** | βœ… | βœ… | ❌ | ❌ |
-| **Retention Analysis** | βœ… | βœ… | ❌ | ❌ |
-| **Goals & Events** | βœ… | βœ… | βœ… | ❌ |
-| **Real-time Dashboard** | βœ… | βœ… | βœ… | βœ… |
-| **Custom Events (JSON)** | βœ… | βœ… | ⚠️ Limited | ❌ |
-| **Error Tracking** | βœ… | ❌ | ❌ | ❌ |
-| **Public Dashboards** | βœ… | ❌ | βœ… | ❌ |
-| **Organizations** | βœ… | βœ… | βœ… | βœ… |
-| **Free Tier** | βœ… | βœ… | ❌ | βœ… |
-| **Frog 🐸** | βœ… | ❌ | ❌ | ❌ |
+| **Open Source** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Self-Hosting** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} />\* | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Cookieless & Privacy friendly** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Advanced Maps** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Advanced Filters** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <span className="inline-flex items-center gap-1"><AlertTriangle className="w-5 h-5" color="orange" strokeWidth={3} /> Limited</span> | <span className="inline-flex items-center gap-1"><AlertTriangle className="w-5 h-5" color="orange" strokeWidth={3} /> Limited</span> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Web Vitals** | <span className="inline-flex items-center gap-1"><AlertTriangle className="w-5 h-5" color="orange" strokeWidth={3} /> Paid</span> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Session Details** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **User Profiles** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Session Replays** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Funnels** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <span className="inline-flex items-center gap-1"><AlertTriangle className="w-5 h-5" color="orange" strokeWidth={3} /> Paid</span> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **User Journeys** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Retention Analysis** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Goals & Events** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Real-time Dashboard** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Custom Events (JSON)** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <span className="inline-flex items-center gap-1"><AlertTriangle className="w-5 h-5" color="orange" strokeWidth={3} /> Limited</span> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Error Tracking** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Public Dashboards** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Organizations** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Free Tier** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Frog 🐸** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
\* Plausible's Community Edition has very limited features compared to their cloud version
diff --git a/docs/content/docs/meta.json b/docs/content/docs/meta.json
index b5eda1e7f..e1e54391d 100644
--- a/docs/content/docs/meta.json
+++ b/docs/content/docs/meta.json
@@ -4,13 +4,13 @@
"index",
"roadmap",
"architecture",
+ "self-host-vs-cloud",
"---Tracking---",
"script",
"track-events",
"sdks",
"guides",
"api",
- "localhost-tracking",
"hiding-own-traffic",
"filter-traffic",
"---Self-hosting---",
diff --git a/docs/content/docs/roadmap.mdx b/docs/content/docs/roadmap.mdx
index 99c9695cd..122ebdce7 100644
--- a/docs/content/docs/roadmap.mdx
+++ b/docs/content/docs/roadmap.mdx
@@ -15,9 +15,5 @@ Rybbit is a quickly growing project. We already have quite a few features, but t
- More tracking script/SDK integration guides
- Mobile app support
- Custom themes
-- Revenue tracking
-- Email reports
-- Traffic filters/bot blocking
-- Traffic alerts
Once again, join our [Discord server](https://discord.gg/DEhGb4hYBj) or follow me on [X](https://x.com/yang_frog) to share your feedback and ideas. We would love to hear from you!
\ No newline at end of file
diff --git a/docs/content/docs/self-host-vs-cloud.mdx b/docs/content/docs/self-host-vs-cloud.mdx
new file mode 100644
index 000000000..6991596f8
--- /dev/null
+++ b/docs/content/docs/self-host-vs-cloud.mdx
@@ -0,0 +1,34 @@
+---
+title: Self-Hosted vs Cloud
+description: Compare self-hosted and cloud versions of Rybbit
+---
+import { Check , X} from "lucide-react";
+
+Rybbit offers two deployment options: a fully-managed [cloud version](https://rybbit.com) and a [self-hosted](/docs/self-hosting) solution. This guide will help you choose the right option for your needs.
+
+## Quick Comparison
+
+| Feature | Cloud | Self-Hosted |
+| --------------------------- | ---------- | --------------- |
+| **Setup Time** | Minutes | 1-2 hours |
+| **Maintenance Required** | None | Regular updates |
+| **Cookieless & Privacy friendly** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Web Analytics** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Globe** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Session Replays** | <span className="inline-flex items-center gap-1"><Check className="w-5 h-5" color="green" strokeWidth={3}/> (On pro tier)</span> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Funnels** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Goals** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Sessions** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Journeys** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Users** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Retention** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Error tracking** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Organizations** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <Check className="w-5 h-5 inline" color="green" strokeWidth={3} /> |
+| **Pages View** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Web Vitals** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Email reports** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Google Search Console integration** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **VPN/Crawler/ASN tracking** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Google/Github OAuth** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+| **Email support** | <Check className="w-5 h-5 inline" color="green" strokeWidth={3}/> | <X className="w-5 h-5 inline" color="gray" strokeWidth={3} /> |
+
diff --git a/docs/content/docs/self-hosting-guides/meta.json b/docs/content/docs/self-hosting-guides/meta.json
index 4060bc33f..bdd8d3054 100644
--- a/docs/content/docs/self-hosting-guides/meta.json
+++ b/docs/content/docs/self-hosting-guides/meta.json
@@ -1,4 +1,4 @@
{
"title": "Self-Hosting Guides",
- "pages": ["custom-nginx", "nginx-proxy-manager", "self-hosting-advanced", "self-hosting-manual"]
+ "pages": ["custom-nginx", "nginx-proxy-manager", "self-hosting-advanced", "self-hosting-manual", "pangolin"]
}
diff --git a/docs/content/docs/self-hosting-guides/pangolin.mdx b/docs/content/docs/self-hosting-guides/pangolin.mdx
new file mode 100644
index 000000000..b7eed8ce2
--- /dev/null
+++ b/docs/content/docs/self-hosting-guides/pangolin.mdx
@@ -0,0 +1,15 @@
+---
+title: Pangolin Setup
+description: Set up Rybbit with Pangolin
+---
+
+<iframe
+ width="560"
+ height="315"
+ src="https://www.youtube.com/embed/zk-ZhkNdyC8?start=5"
+ title="YouTube video player"
+ frameBorder="0"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
+ allowFullScreen
+></iframe>
+
diff --git a/docs/content/docs/troubleshooting.mdx b/docs/content/docs/troubleshooting.mdx
index 836a41acd..c3b8f6655 100644
--- a/docs/content/docs/troubleshooting.mdx
+++ b/docs/content/docs/troubleshooting.mdx
@@ -90,4 +90,27 @@ cp .env.example .env
# Edit .env with your configuration
# Then start the services
docker-compose up -d
-```
\ No newline at end of file
+```
+
+## I ran out of disk space
+
+Regular web analytics events take up almost no space in Clickhouse, so it is very unlikely that you ran out of disk space from from this. There are two main reasons why you might have run out of disk space:
+
+### 1. You are using session replay
+
+On self-hosted instances where we don't have access to S3 compatiable object storage, session replays are stored in Clickhouse. Each session replay is at least 1000x the data footprint of the web analytics events. So it's very easy to run out of disk space.
+
+We have a 30 day retention policy for session replays events, so if you turn off session replay, your disk space will slowly come back. If you need to immediately free up space, you can truncate the session replays table:
+
+```bash
+docker exec -it clickhouse clickhouse-client --database analytics
+
+TRUNCATE TABLE session_replay_events;
+TRUNCATE TABLE session_replay_metadata;
+```
+
+### 2. You didn't mount the Clickhouse log suppression configs
+
+In our [docker-compose.yml](https://github.com/rybbit-io/rybbit/blob/master/docker-compose.ymlg), we have a config for Clickhouse that suppresses logs. Clickhouse stores a ton of logs in the log tables by default. This will quickly fill up your disk space if left unchecked.
+
+If you follow the standard installation process, the configs are already mounted for you. If you rolled your own Docker setup, you need to mount the configs manually.
\ No newline at end of file
diff --git a/docs/src/components/TrackedButton.tsx b/docs/src/components/TrackedButton.tsx
index 52136139c..527b81129 100644
--- a/docs/src/components/TrackedButton.tsx
+++ b/docs/src/components/TrackedButton.tsx
@@ -13,7 +13,12 @@ interface TrackedButtonProps {
export function TrackedButton({ href, eventName, eventProps, className, children }: TrackedButtonProps) {
return (
- <Link href={href} className="w-full sm:w-auto">
+ <Link
+ href={href}
+ className="w-full sm:w-auto"
+ data-rybbit-event={eventName}
+ data-rybbit-prop-location={eventProps.location}
+ >
<button onClick={() => trackAdEvent(eventName, eventProps)} className={className}>
{children}
</button>