Skip to content
Self-hosting

It runs in your Cloudflare account.

No analytics vendor in the middle, no database cluster to tune. InsightFlare is one Worker plus Cloudflare's own storage, deployed with a single click into an account you control.

10K+events a day
Measured

A free Cloudflare account is enough

In our tests, InsightFlare on a free Cloudflare account records more than 10,000 events a day. How much it can take also depends on queries: opening the dashboard and calling the API use D1 read allowance too.

Your Cloudflare account
↘
Visitor's browser
script.js · ≈3.8 KB
01
Workers
Collection, dashboard, API
02
Durable Objects
Ingest buffering and real-time
03
D1
Analytics data and queries
04
KV
Site tracking settings
05
Analytics Engine
Request and traffic observability
06coming soon
R2
Data archive
01

One-click deploy

Deploy from GitHub to Cloudflare, then finish setup in the browser.

02

Pay for usage only

InsightFlare itself is free. The only bill is your own Cloudflare usage, not seats and not events. In our tests a free Cloudflare account handles more than 10,000 events a day.

03

Runs at the edge, scales automatically

Collection and the dashboard run on Cloudflare's global edge network, close to each visitor. Workers scale per request, so traffic spikes need no capacity planning.

04

Privacy first

No cookies from the tracker. Smart tracking strength switches identification by region: a daily identifier for EU visitors, full return-visit accuracy elsewhere.

Performance and scaling

Runs at the edge, scales per request.

There is no central server. Every request is handled by the Cloudflare location closest to the visitor, and writes are buffered in a Durable Object before they go to D1 in batches.

Simulated requests0Average distance to the nearest node—
Simulated animation; node positions are illustrative, based on some Cloudflare data center cities
01

Nearby edge locations

The tracking script, the collect endpoint and the dashboard all run on Cloudflare's global edge network, so visitors and you connect to the closest location.

02

Automatic scaling

Workers are billed and run per request. There are no instances to reserve and no servers to scale; Cloudflare absorbs traffic spikes.

03

Buffered, batched writes

Each site has a Durable Object that receives collected data and feeds the real-time view. Every 60 seconds it writes the buffered visits and events to D1 in one batch.

04

Rollups and edge caching

A scheduled task rolls finished visits into hourly data, so trend and count queries read fewer rows. The tracking script is cached at the edge and generated per site.

Deploy

Five steps from zero to your first visit.

Connect your Cloudflare account, review the plan and choose an administrator password. Deploy handles the rest.

1

Deploy to Cloudflare

Open InsightFlare Deploy and select your Cloudflare account. Choose a domain and administrator password; Deploy creates and configures the resources.

Cloudflare OAuth · Install
2

Sign in

Open your instance and sign in as admin. The administrator and a default team are created on first sign-in.

https://insightflare.<you>.workers.dev
3

Add a site

Create a site with a name and a domain in Site Management.

edgekit.dev
4

Install the script

Paste the snippet from your dashboard into the page. It already contains your instance address and site ID.

<script defer src=".../script.js?siteId=…">
5

Confirm data arrives

Visit your site, then open Real-time. Your own visit appears within moments.

● 1 online
Cost

Measure the workload before estimating the cost.

InsightFlare runs in your own Cloudflare account. The bill depends on traffic, how you query the data, how long you keep it, which optional services you use, and the pricing that applies to your account.

Resource usage to recordThere is no made-up monthly total here. Record these numbers for a representative period, then apply current prices and any free allowances.
01
Worker execution
Requests and CPU time

Collection, dashboard, API, scheduled task, and admin requests all run application code.

Cloudflare Workers usage for the measured period

02
D1 database
Rows read, rows written, and stored bytes

Incoming visits and events write data. Dashboards and the API read data depending on the time range, filters, and type of query.

D1 usage for each production database

03
R2 archive
Stored bytes and operations

R2 archiving is coming soon. For now, data is stored in D1 and nothing is moved to R2.

Nothing to record until the feature is released

04
Analytics Engine
Data points written and queried

Request observability uses Analytics Engine. It is optional and separate from core traffic analytics.

Analytics Engine usage when request observability is enabled

05
Email delivery
Messages sent

Email notifications are sent through the email provider you configure.

Your email provider's usage and current pricing

How to estimate the cost

Record workload and prices separately, so you can recheck the estimate when traffic, retention, or prices change.

  1. 1Choose a representative measurement period and note its start and end dates.
  2. 2Record the number of sites, visits, and events, how long data is kept, dashboard and API query volume, and which optional services are enabled.
  3. 3Export usage from each provider for the same period and match each meter to the resources above.
  4. 4Apply the current prices and allowances from your own account, and note the currency, region, and pricing date.
  5. 5Scale only the numbers you expect to change, and keep the original measurements next to the estimate.

What to know before you deploy

01

Your data stays in your account

Collection, storage, the dashboard, and the API all run in your own Cloudflare account.

02

What the browser stores

Tracking strength has three levels: Strong, Smart and Weak. Smart is the default. Smart: visitors from countries Cloudflare marks as EU get an identifier that the server changes every day (a hash of IP, User-Agent and a daily salt; the browser stores nothing), and visitors elsewhere get a random ID stored in localStorage. Strong: every region uses a random ID in localStorage. Weak: every region uses the daily identifier. The tracking script does not use cookies. The dashboard uses cookies for the login session and language preference, which has nothing to do with visitors.

03

Your responsibility

Secrets, access control, data retention, upgrades, optional services, and provider billing are all up to whoever runs the deployment.

Self-hosting questions

There is no single number that fits everyone. Measure your own workload, check the current prices from Cloudflare and any optional providers, and write down your assumptions using the method above.