
Deploy Plausible Squarespace
Cookie-free analytics for Squarespace sites via code injection
plausible
Just deployed
/var/lib/plausible
Just deployed
/var/lib/clickhouse
Just deployed
/var/lib/postgresql/data
Deploy and Host self hosted Plausible Squarespace (Self-Hosted Website Analytics for Squarespace) on Railway
Plausible Squarespace runs a self-hosted Plausible Community Edition instance on Railway.
About Hosting Plausible Squarespace open-source software on Railway (self hosted Plausible Community Edition analytics for Squarespace sites template)
This template runs Plausible Community Edition v3.2.1 on port 8000 with a public HTTPS domain, backed by Railway Postgres for users, sites and goals, and ClickHouse for events.
You still own the data.
Why Deploy Plausible Squarespace, the Google Analytics alternative on Railway (Railway Free Trial)
Google Analytics is the Squarespace default, but it trades away privacy and adds script weight.
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 Squarespace 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 Squarespace self hosting
Plausible Squarespace runs three services that must stay up for analytics to collect.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | All three services deploy with a public HTTPS domain and private networking wired up. | A Droplet with root access, but you install Docker, the reverse proxy and TLS yourself. |
| AWS | One template instead of VPCs, security groups and a managed Postgres setup. | Fine-grained control and scale, with a longer setup and a harder-to-predict bill. |
| Hetzner | Managed deploys and a dashboard for logs and variables, with no firewall work. | Low-cost raw servers that suit long-running boxes, if you handle installs and upgrades. |
Pick Railway for a quick start, or a VPS if you want the lowest raw cost and don't mind running the server yourself.
Common Use Cases for hosted Plausible Squarespace
- Tracking contact form submissions: Point the form's post-submit redirect at a thank-you page, then add a Pageview goal for that path in Plausible. Each completed form counts as a conversion.
- Counting outbound link clicks by domain: Turn on Outbound links under Default tracking in the General section of site settings. Filter the url property with "contains" to see which partner or supplier sites get the clicks.
- Grouping completed Squarespace orders: Squarespace sends buyers to a path like /commerce/orders/your-id after checkout. A pageview goal on /commerce/orders/* collects every order in one place.
- Excluding your own IP addresses: Add your IPv4 and IPv6 addresses under Shields, IP Addresses, so your own visits do not skew the numbers. Block both protocols, because a visit over the other one still gets recorded.
- Keeping visitor data on your own server: Your data stays on Postgres and ClickHouse that you run on Railway, not on Google's servers. Plausible sets no cookies, so you can often skip a consent banner.
Dependencies for Plausible Squarespace Docker hosted on Railway
This section covers the three services in the Railway template and the variables that connect them.
Deployment Dependencies for Managed Plausible Squarespace Service (Web Analytics)
The plausible service uses ghcr.io/plausible/community-edition:v3.2.1 on port 8000 behind a public HTTPS domain, with a volume at /var/lib/plausible.
Implementation Details for Plausible Squarespace (Using Plausible official docker image)
BASE_URL is https://${{RAILWAY_PUBLIC_DOMAIN}}, so the snippet you paste into Squarespace points at your Railway domain.
How does Plausible Squarespace compare against other ways to add analytics to a Squarespace site
Plausible Squarespace is one of several ways to get numbers for a Squarespace site.
Plausible Squarespace vs Squarespace Analytics (Built-in Squarespace Analytics)
- Setup: Squarespace Analytics needs nothing added. Plausible needs a snippet in Code Injection, which requires a plan that includes it.
- Depth: Squarespace covers basic traffic and sales. Plausible adds goals for form submissions, outbound clicks and order paths.
- Data location: Plausible CE on Railway keeps visit data on a server you run.
- Where Squarespace wins: for a quick traffic check without custom goals, the built-in tool is simpler and costs nothing extra.
Plausible Squarespace vs Google Analytics (Google Analytics 4)
- Privacy: Plausible sets no cookies, so most sites skip a consent banner. GA4 uses cookies, and EU sites usually need one.
- Script weight: Plausible's script is much smaller than Google's tag.
- Ecosystem: GA4 integrates with Google Ads and Looker Studio. Plausible CE has no Looker Studio connector.
- Where Google wins: GA4 is free and is the default most marketing tools expect.
Plausible Squarespace vs Fathom (Fathom Analytics)
- Hosting: Fathom is closed-source and hosted only. Plausible CE runs in your own Railway project under AGPL-3.0.
- Cost model: Fathom bills a subscription. Plausible CE has no license fee, and you pay Railway usage instead.
- Operations: with Plausible you own upgrades, backups and monitoring.
- Where Fathom wins: if you want zero infrastructure work, Fathom is easier to start with.
Plausible Squarespace vs Umami (Umami Analytics)
- Stack: Umami is MIT-licensed and, in v3, runs on PostgreSQL only. Plausible CE uses Postgres plus ClickHouse, so it has two data stores to manage.
- Features: Plausible includes goal tracking, form and outbound link detection, and IP shields in the dashboard.
- Resources: ClickHouse is the largest memory consumer, so plan on at least 2 GB of RAM.
- Where Umami wins: if you want a simpler single-database setup, Umami is the lighter choice.
How to use Plausible Squarespace (the OSS web analytics platform)?
- Confirm your Squarespace plan includes code injection.
- Open your Plausible dashboard on your Railway domain, add a site and copy the snippet.
- In Squarespace, open Code Injection (check the menu path for your version) and paste the snippet into Header Code, then click Save.
- Load the live site and confirm visits appear in Plausible.
- For form submissions, create a thank-you page with the Pages panel + button, set the form's Edit Post-Submit to Redirect, attach that link, then test in a private window.
- In Plausible, open Goals, click + Add goal, select Pageview and enter /thank-you.
- Under General / Default tracking, enable Form submissions and Outbound links.
- For order tracking, add a pageview goal with /commerce/orders/*.
- Under Shields, add your IPv4 and IPv6 addresses to IP Addresses with the block-current-IP button.
The snippet from step 2 looks like this:
How to self host Plausible Squarespace on other VPS Services (Plausible self hosting guide)
This path runs the same Plausible Community Edition stack on a VPS.
Clone the Repository
Pin the release tag so you know which version you are running.
git clone -b v3.2.1 --single-branch https://github.com/plausible/community-edition plausible-ce
cd plausible-ce
Install Dependencies
You need Docker with the Compose plugin and at least 2 GB of RAM.
docker compose version
Configure Environment Variables
Create a .env file with your public address and a secret key. Keep the secret stable across restarts.
echo "BASE_URL=https://your-domain" > .env
echo "SECRET_KEY_BASE=$(openssl rand -base64 48)" >> .env
Use the same domain in the Squarespace snippet, since the dashboard builds it from BASE_URL.
Start the Plausible Squarespace Application
Start the stack, then open https://your-domain and register the first user, who becomes the owner.
docker compose up -d
Railway handles the database services, public domain and restarts for you, which this manual setup leaves to you.
Official Pricing of Plausible Squarespace (Plausible pricing)
Plausible Squarespace itself is free and open source, so the software costs nothing to run.
Plausible Squarespace cloud vs self hosted comparison (Pricing, features, costs, and more)
Self-hosting Plausible Community Edition is free to license but not free to run.
Monthly cost of self hosting Plausible Squarespace on Railway
On Railway, the Plausible, Postgres and ClickHouse services together typically land around $10-20 per month for a low-traffic site, and higher for bigger sites with more events and RAM.
System Requirements for Hosting Plausible Squarespace on a VPS
The CE README requires a CPU with SSE 4.2 or NEON support, since ClickHouse depends on it.
Frequently Asked Questions (FAQs)
Do I need a paid Squarespace plan for code injection?
Yes, site-wide code injection is a premium Squarespace feature.
Why do my form redirects fail while I am logged in?
Squarespace skips post-submit redirects while you are logged in. Test the form in a private window instead.
How do I exclude my own visits?
In Plausible, open Site Settings, go to Shields and add your address under IP Addresses with the block-current-IP button.
Do I need both IPv4 and IPv6 blocked?
Yes, if your device uses both. A visit over the unblocked protocol will still be recorded and skew your numbers.
Does order tracking work with the wildcard path?
Yes. A pageview goal on /commerce/orders/* groups every completed order under one goal.
How does this compare to Squarespace Analytics and Google Analytics?
Squarespace Analytics only shows data in Squarespace's own dashboard.
Template Content
