
Product
Introducing Socket Scanning for VS Code Marketplace Extensions
Socket now scans VS Code extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
statable-analytics
Advanced tools
Add Statable privacy-first web analytics to an Astro or Vite site with one line of config. Cookieless, no consent banner for your analytics, EU-hosted.
Add Statable to an Astro or Vite site with one line of config.
Statable is privacy-first web analytics: no cookies, no consent banner for your
analytics, data stored in the EU. The package ships the integration only. It has
no runtime dependencies and adds a single deferred <script> to your pages.
npm install statable-analytics
You need a numeric Site ID. Find it in Statable under Site settings → Tracking Code.
// astro.config.mjs
import { defineConfig } from 'astro/config'
import statable from 'statable-analytics/astro'
export default defineConfig({
integrations: [statable({ siteId: '3270462' })],
})
// vite.config.js
import { defineConfig } from 'vite'
import statable from 'statable-analytics/vite'
export default defineConfig({
plugins: [statable({ siteId: '3270462' })],
})
Works with any Vite project that builds an HTML entry, including React, Vue, Svelte and Solid templates.
| Option | Type | Default | What it does |
|---|---|---|---|
siteId | string | number | required | Numeric Site ID from Site settings |
host | string | https://statable.com | Origin the tracker is served from. Change it only when you proxy the script through your own domain |
trackingApi | string | <host>/api/event | Override the ingest endpoint |
beforeSend | string | none | Name of a global function that may adjust custom props before an event is sent |
props | Record<string, string | number | boolean> | none | Sticky custom properties added to every event from a page load |
dev | boolean | false | Also load the tracker in the dev server |
disabled | boolean | false | Skip injection entirely |
Local runs stay out of your stats by default. Pass dev: true when you want to
check the tracker while developing.
statable({
siteId: '3270462',
props: { env: 'production', plan: 'pro' },
})
Each entry becomes a data-statable-<key> attribute, so keys must be
alphanumeric with dashes.
statable({
siteId: '3270462',
host: 'https://stats.example.com',
trackingApi: 'https://stats.example.com/api/event',
})
The tracker exposes window.statable.t(event, props) once it has loaded. Guard
the call, because the script is deferred:
window.statable?.t('signup', { plan: 'pro' })
See the JavaScript API for the full reference.
MIT © Key Arg B.V.
FAQs
Add Statable privacy-first web analytics to an Astro or Vite site with one line of config. Cookieless, no consent banner for your analytics, EU-hosted.
The npm package statable-analytics receives a total of 10 weekly downloads. As such, statable-analytics popularity was classified as not popular.
We found that statable-analytics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket now scans VS Code extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Research
/Security News
Socket uncovered two malicious VS Code themes in a GlassWorm-linked cluster with thousands of installs across VS Code Marketplace and Open VSX.

Security News
/Company News
Capital One is partnering with Socket to proactively secure its open source supply chain.