Skip to content
Sillage by KAYZEN

Contact card — KAYZEN

Web agency · Lyon

QR code — Website

Open the Sillage website (opens in a new tab)

Installation

Sillage runs on your own Cloudflare account. You need a free account, Node.js 20 or later, and about ten minutes.

Deploy

Get the code and install its dependencies:

git clone https://github.com/kayzen-lyon/sillage.git
cd sillage
npm install
npx wrangler login

Create the database, then copy the identifier it prints (database_id) into wrangler.jsonc:

npx wrangler d1 create sillage

Still in wrangler.jsonc, replace ALLOWED_SITES with your domains, separated by commas (for example www.my-site.com,my-site.com). Only these sites can send visits.

Create the tables, choose the dashboard password, then deploy:

npm run db:init
npx wrangler secret put DASHBOARD_PASSWORD
npm run deploy

Wrangler prints the Worker's address, such as https://sillage.your-account.workers.dev. The dashboard is at /app/ on that Worker. You can also give it a subdomain of your own in wrangler.jsonc (the routes section, with custom_domain).

Add the script

Paste this line in the head (<head>) of every page, replacing the address with your Worker's:

<script defer src="https://sillage.your-account.workers.dev/s.js"></script>

The script weighs under 2 KB compressed. It sends nothing if the browser sends the Global Privacy Control signal, or if the visitor has opted out (sillage.refuser()). Adding ?sillage=exclure to an address on your site excludes your own device.

Options

SettingEffect
data-sillage="name"On a button or link: counts a goal on every click. In JavaScript: sillage.objectif("name").
sillage.achat(49.90, "Plan")On the order confirmation page: records a purchase, its amount in euros and its product. Revenue, average order and sales by product appear in the Goals tab.
sillage.introuvable()Nothing to do if your error page title contains “404” or “not found”: the page is recorded automatically, along with the page that linked to it. Otherwise, call this function on the error page. Site searches (?q=, ?s=, ?search=) and forms started then left unsent are counted too, never with anything typed into the fields.
/v.jsOptional second script: measures LCP, INP and CLS (Web Vitals), with no link to the visitor.
PUBLIC_SITESSites whose statistics can be read without signing in, like a demo. Never the companies, the log or the export.
SITE_PASSWORDSJSON secret {"www.a.com": "password"}: access limited to a single site, for a client.
ENTREPRISES"1" turns on company recognition. Read the privacy page first.
HIT_KEYSecret that lets your server report AI crawlers on /api/hit.
RETENTION_MONTHSRetention of raw page views, 13 months by default. Daily totals are kept for 25 months.
MARQUE_NOM, MARQUE_LOGOWhite label. A site's dashboard already shows that site's icon and name, read from the site itself. These two settings set the branding of the "All sites" view (logo served by your Worker, path starting with /).
EXCLURE_PAGESPages never measured, comma-separated, trailing « * » for a prefix (e.g. /admin/*,/preview). Identifiers slipped into an address (email, token, long number) are masked anyway.
EXCLURE_IPYour own devices, never measured: exact IP addresses or address prefixes (e.g. 203.0.113.). The address is only compared in memory, never stored.
SURVEILLANCE_WEBHOOKHTTPS webhook (Slack, Discord, Teams…) that receives drop, peak or silent-site alerts every morning, and the weekly report on Mondays.
DEMO_SITEName of a demo site (also add it to ALLOWED_SITES and PUBLIC_SITES) fed with fictitious visits every 15 minutes, to show the dashboard without exposing real data.

Upgrade from 1.0

Get the new version, add the aggregate tables, then redeploy:

git pull
npm install
npx wrangler d1 execute sillage --remote --file worker/migrations/0005-v2.0.sql
npm run deploy

In wrangler.jsonc, the triggers section must contain both scheduled tasks: "*/15 * * * *" (totals) and "17 4 * * *" (purge). Past days are caught up automatically, a few days on each run.

Free plan limits

Cloudflare's free plan allows 100,000 Worker requests a day, and 100,000 rows written and 5 million rows read a day on D1. In practice, Sillage handles about 20,000 page views a day across all your sites. Beyond that, Cloudflare's paid plan (Workers Paid) takes over; Sillage itself stays free.