# crowne

> Privacy-first analytics for your sites: browser and server clients for crowne.io.

Latest version **0.4.0** (published 2026-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install crowne
pnpm add crowne
yarn add crowne
bun add crowne
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2026-10-29 |
| First published | 2022-10-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=22 |
| Dependencies | 0 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | crowne.io |
| Maintainers | crowne-dev |
| Keywords | analytics, privacy, cookieless, web analytics, events |

## Links

- npm: https://www.npmjs.com/package/crowne
- Homepage: https://crowne.io/docs/
- npm.io page: https://npm.io/package/crowne

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.4.0 (latest) — 2026-10-29
- 0.3.0 — 2026-10-28
- 0.2.0 — 2022-10-17
- 0.1.1 — 2022-10-17
- 0.1.0 — 2022-10-14
- 0.0.9 — 2022-10-14
- 0.0.8 — 2022-10-14
- 0.0.7 — 2022-10-12
- 0.0.2 — 2022-10-11
- 0.0.1 — 2022-10-11
- 0.0.0 — 2022-10-11

## README

# crowne

> Cookieless web analytics and custom events for every site you run, from [crowne.io](https://crowne.io).

Read the full docs at **[crowne.io/docs](https://crowne.io/docs/)**.

## Install

```sh
$ npm install crowne
```

## Modules

<!-- sizes:start -->

#### `crowne/browser`

> **Size (gzip):** 850 bytes

#### `crowne/server`

> **Size (gzip):** 1.1 kB

<!-- sizes:end -->

## Usage

### Browser

Use `crowne/browser` when your app has a bundler. It counts a page view now, on each in-app navigation, and on each back/forward restore. See [npm package](https://crowne.io/docs/install/npm/).

```ts
import { crowne } from "crowne/browser";

let analytics = crowne("YOUR_SITE_ID");

analytics.track("signup", { plan: "pro" });
```

### Server

Use `crowne/server` to count events from a Worker or Node, or to serve a [first-party proxy](https://crowne.io/docs/proxy/). It needs a key with the `events:write` scope. Never send the key to a browser. See [Server package](https://crowne.io/docs/install/server/). Outside Cloudflare Workers, set the `ip` option, as [Visitor address](https://crowne.io/docs/install/server/#visitor-address) shows.

```js
import { env } from "cloudflare:workers";
import { crowne } from "crowne/server";

let analytics = crowne({ key: env.CROWNE_KEY, site: "YOUR_SITE_ID" });

export default {
  async fetch(request, env, ctx) {
    ctx.waitUntil(analytics.pageview(request));
    return new Response("Hello");
  },
};
```

No package fits? Use the [script tag](https://crowne.io/docs/install/script/) or call the [REST API](https://crowne.io/docs/api/).

## License

MIT © [crowne.io](https://crowne.io)

---
_Source: https://npm.io/package/crowne · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
