
Deploy Plausible Custom Events
Track signups, clicks and goals without cookies
Just deployed
/var/lib/clickhouse
plausible
Just deployed
/var/lib/plausible
Just deployed
/var/lib/postgresql/data
Deploy and Host self hosted Plausible Custom Events (Open-Source Event Analytics) on Railway
Plausible CE and ClickHouse on Railway for site owners who count signups and clicks, not cookies. Covers custom events: the plausible-event-name=Signup class or a plausible() call, and the goal you must create to see them.
About Hosting Plausible Custom Events open-source software on Railway (self hosted Plausible custom events template)
Your event data stays in your own Postgres and ClickHouse, not someone else's dashboard. Railway handles the domain, TLS, private IPv6 networking, volumes and the /api/health check. You still own the goal names and the tracking snippet.
Why Deploy Plausible Custom Events, the Google Analytics 4 alternative on Railway (Railway Free Trial)
GA4 is free but you pay in cookies, consent banners and a UI nobody enjoys. Here the events, goals and raw ClickHouse data stay yours. Railway's $5 Hobby plan includes $5 of usage, enough for a first test drive.
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Plausible Custom Events on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Railway vs Other Hosting Providers and VPS for Plausible Custom Events self hosting
Railway wires the three services for you; the others hand you a server and a compose file.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Template deploy with Postgres, HTTPS domain, ClickHouse service | A Droplet you patch, Compose and certs yourself |
| AWS | One project, env vars wired, volumes for both data dirs | ECS or EC2 plus RDS and self-managed ClickHouse, IAM to set up |
| Hetzner | Same stack, usage billing, no server to harden | Cheap CX boxes suit Plausible, but you own firewall, backups and the 2 GB RAM floor |
Pick Railway if you would rather debug a missing Signup goal than a kernel panic.
Common Use Cases for hosted Plausible Custom Events
- Signup button clicks: tag the button with plausible-event-name=Signup, then create a Custom event goal with that exact name so trial starts land as conversions.
- Newsletter form submits: fire plausible('Newsletter') after a successful submit, or narrow the goal by a source property to separate footer signups from blog ones.
- Outbound and file download clicks: turn on the automated tracking toggles, or send your own event when a partner link or PDF gets clicked.
- Pricing page plan selection: send props like plan: 'pro' and filter the goal by that value to see which tier people pick.
- Docs search usage: fire an event with the section as a property, so you learn where readers give up and search instead.
Dependencies for Plausible Custom Events Docker hosted on Railway
Custom event goals need three services on one private network: the Plausible CE app on port 8000, Railway Postgres for sites and goal definitions, and ClickHouse, which stores every event you send.
Deployment Dependencies for Managed Plausible Custom Events Service (Web Analytics)
The plausible service runs ghcr.io/plausible/community-edition:v3.2.1 with a volume at /var/lib/plausible and a healthcheck on /api/health. ClickHouse runs clickhouse/clickhouse-server:24.12-alpine with a volume at /var/lib/clickhouse and database plausible_events_db.
Implementation Details for Plausible Custom Events (Using Plausible CE official docker image)
Start command, same as the official compose file:
/entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run
LISTEN_IP=:: and ECTO_CH_IPV6=true are required because Railway private networking is IPv6, and RAILWAY_RUN_UID=0 lets the app write to its volume.
How does Plausible Custom Events compare against other web analytics tools
Plausible vs Google Analytics 4 (GA4 Alternative)
- Event setup: one CSS class or one plausible() call plus a matching goal. GA4 needs DebugView and custom dimensions.
- Consent: GA4 sets cookies, so EU sites add a banner. Plausible CE stores no personal data.
- Where GA4 wins: free, Google Ads and BigQuery integration, audience sharing.
Plausible vs Umami (Umami Alternative)
- Stack weight: Umami v3 runs on Node and PostgreSQL alone. Plausible CE adds ClickHouse, the memory hog.
- Events: both do custom events and properties. Plausible adds automated outbound, download and form tracking.
- Where Umami wins: lower RAM floor and a quicker start on a cheap VPS.
Plausible vs Matomo (Matomo Alternative)
- Scope: Matomo is a GA-style suite; heatmaps, funnels and A/B testing are paid plugins. CE stays narrow.
- Licenses: Plausible is AGPL-3.0, Matomo GPL-3.0, both free to self host without per-event billing.
- Where Matomo wins: depth, session recordings and ecommerce reports. CE pushes funnels and revenue to Cloud.
Plausible vs PostHog (PostHog Alternative)
- Focus: PostHog is product analytics: autocapture, session replay, feature flags. Plausible is website analytics.
- Event model: every CE event is deliberate, a class or a plausible() call, invisible until a goal matches.
- Where PostHog wins: funnels, retention and in-app product questions. Different tool, different job.
How to use Plausible Custom Events (the OSS web analytics tool)?
- Open your Railway domain and register the first user. That account becomes owner.
- Add your site, then paste the snippet from Site Settings, Site Installation into your site head.
- Tag the signup button with a CSS class, or call the script directly:
<button class="plausible-event-name=Signup">Start</button>
plausible('Signup', {props: {plan: 'pro'}})
- Under Site Settings, Goals, add a Custom event goal named Signup. Names must match exactly; past events are not backfilled.
- Click the button and check the POST to your-domain/api/event in the network tab. A x-plausible-dropped: 1 header means the event was filtered.
- Add props.plan, then narrow the goal by property values.
How to self host Plausible Custom Events on other VPS Services (Plausible CE self hosting guide)
Clone the Repository
Pull the release branch, not main:
git clone -b v3.2.1 --single-branch https://github.com/plausible/community-edition plausible-ce
Install Dependencies
Docker Engine plus the Compose plugin is all you need. Your CPU must support SSE 4.2 or NEON (ClickHouse requirement), and 2 GB RAM is the floor since ClickHouse eats most of it.
Configure Environment Variables
BASE_URL=https://your-domain
SECRET_KEY_BASE=$(openssl rand -base64 48)
Keep the secret stable. Add SMTP settings only if you want invites and password resets to actually arrive.
Start the Plausible Custom Events Application
Run docker compose up -d. With ports 80 and 443 free, Caddy fetches a Let's Encrypt certificate itself; otherwise put a reverse proxy in front. Visit your-domain, register the first user, add the site, paste the snippet. Events stay invisible until a matching Custom event goal exists.
Railway handles the domain, TLS, private IPv6 networking, and the create and migrate step on every deploy.
Official Pricing of Plausible Custom Events (Plausible CE pricing)
Plausible CE is free. It's AGPL-3.0, there's no license fee and no pageview billing, so tracking a million custom events costs the same as tracking a hundred: nothing. Plausible Cloud, by comparison, starts at $9/mo.
Plausible Custom Events cloud vs self hosted comparison (Pricing, features, costs, and more)
Cloud charges per pageview; self-hosted CE on Railway charges for three services. Custom events bill as pageviews on Cloud, but CE has no pageview meter, so a busy Signup button costs nothing extra.
Monthly cost of self hosting Plausible Custom Events on Railway
A low-traffic site typically lands around $10-20/mo across plausible, Postgres and ClickHouse. Hobby is $5/mo including $5 of usage, and new accounts get a one-time $5 trial credit. Trial services cap at 1 GB RAM each, tight for ClickHouse once events pile up.
System Requirements for Hosting Plausible Custom Events on a VPS
The CPU needs SSE 4.2 or NEON (a ClickHouse requirement), and at least 2 GB RAM is recommended to dodge OOMs. The city-level MaxMind database adds about 1 GB. Back up Postgres and the ClickHouse volume together, or you lose goals and events.
Frequently Asked Questions (FAQs)
Why is my custom event not showing up?
Usually no goal matches the event name exactly, capitalisation included. Add a Custom event goal under Site Settings, Goals, then click the button again; events sent before the goal existed are not backfilled.
Do custom events need a cookie banner?
No. Plausible sets no cookies and no persistent identifiers, so firing events does not create the consent problem GA4 does. That is a general statement, not legal advice.
How many custom properties can I send?
As many key-value pairs as you like in the props object, though each goal filters on specific keys. Keep names consistent, because events missing a property show as (none) in breakdowns.
Can Plausible CE track revenue goals?
Not in Community Edition. Revenue goals, funnels, user journeys and SSO are Cloud Business features, and the revenue option in the plausible() call does nothing here.
Can I track form submissions without code?
Yes. Enable form submission tracking in Site Settings and add a Custom event goal for the name Plausible uses. If you would rather name it yourself, tag the submit button with class plausible-event-name=Signup.
Template Content
