Updated
View as MarkdownPrivacy and cookieless mode
twelvebit collects what you need to see traffic and revenue, and nothing more. This page says exactly what is collected and stored, so you can write an accurate privacy policy.
What the script sends
For each page view, goal or outbound click: the page URL, the referrer (first page view only), the viewport width, the event name and props, and the visitor and session ids from the cookies. The browser also sends its user agent and IP address with the request, as every request does.
What twelvebit stores
| Data | Stored | Notes |
|---|---|---|
Page path, hostname, referrer domain and URL, UTM and ref parameters | yes | Query strings other than UTM and ref/via/source are not stored. |
| Country, region, city, approximate coordinates | yes | From the network edge in front of twelvebit, based on the IP address. |
| Cloud provider of the network | only for visits from a data centre | The provider's name (for example "AWS") when the IP address is in a cloud or hosting provider's published ranges. See cloud networks. |
| Browser, operating system, device type, screen width | yes | Parsed from the user agent. The full user agent is not stored. |
| IP address | no | Used during the request for IP exclusions, the cloud-network check and the daily hash. Then discarded. |
| Visitor id and session id | yes | Random values from the cookies, or the daily hash in cookieless mode. |
| Daily hash of the visit | for 3 days | The daily hash (see cookieless mode) of the browser that started a visit with cookies. A Shopify order without the cart ids finds its visit by it. Deleted after 3 days. |
| Goals and their props | yes | Whatever you send. Do not send personal data in props. |
| Identity (user id, email, name, image, traits) | only when you call identify | See Identify. |
| Payments | yes, from your payment provider | Amount, currency, plan, customer id, email when the provider sends it. |
Cookies
| Name | Lifetime | Purpose |
|---|---|---|
_tb_vid | 1 year | Recognise a returning browser, and link a payment to its visits |
_tb_sid | 30 minutes, renewed with each event | Group page views into one visit |
Both are first-party cookies on your domain (on .example.com when you set data-domain). twelvebit sets no third-party cookies and does not track people across sites.
Cookieless mode
Turn it on in the site settings and add data-cookieless="true" to the script tag:
<script defer data-website-id="tb_YOUR_SITE_ID" data-domain="example.com" data-cookieless="true" src="https://twelvebit.app/js/script.js"></script>- The script sets no cookies and uses no storage.
- The server makes the visitor id from a hash of the IP address, the user agent, the site and a secret salt that changes every day (UTC). The IP address is not stored.
- A visit continues while the same visitor sends events at least every 30 minutes.
- When the site setting is on, the server uses the hash even if a browser sends cookie ids.
What you lose:
- The same person is a new visitor every day, so returning visitors and multi-day journeys are not counted.
- Identify links only that day's visitor.
- Revenue attribution has no cookies to read at checkout. It works when the visitor identified with the same email before paying, and the provider sends that email with the payment. Expect fewer attributed payments.
- People on the same network with the same browser version on the same day can count as one visitor.
Your own cookie banner
Use this when your site has its own consent banner and twelvebit should set cookies only after a yes. Every visit still counts: without a yes, twelvebit counts in cookieless mode.
- Add
data-consent="required"to the script tag:
<script defer data-website-id="tb_YOUR_SITE_ID" data-domain="example.com" data-consent="required" src="https://twelvebit.app/js/script.js"></script>- Tell twelvebit the visitor's choice from your banner, on every page load (once the choice is known) and each time it changes:
twelvebit("consent", true); // analytics cookies allowed
twelvebit("consent", false); // not allowed, or allowed before and now withdrawnWhat happens:
| Choice | Cookies | What counts |
|---|---|---|
| No answer yet | none | Every page view, in cookieless mode. The first page view waits up to 2.5 seconds for an answer. |
true | _tb_vid, _tb_sid | Everything, with returning visitors. The visit so far joins the new visitor id, so it stays one visit. |
false | none, and existing ones are deleted | Every page view, in cookieless mode. |
- Call
twelvebit("consent", …)as early as you can. With the queue stub on the page, a call made before the script loads waits in the queue and the first page view needs no wait. twelvebit("consent", { analytics: true })works too, if your banner gives you an object.- Without
data-consent, the script sets cookies at once, andtwelvebit("consent", false)still removes them. - On Shopify, the script follows the store's own consent banner by itself. You need nothing of this.
Exclude yourself
In the browser that you want to exclude, open the developer console on your site and run:
localStorage.setItem("twelvebit_ignore", "true");To count this browser again: localStorage.removeItem("twelvebit_ignore").
For whole offices or test servers, use the site's exclusions in the dashboard: IP addresses, paths (/admin/*, ** for any depth), hostnames and countries. Excluded requests are dropped before anything is stored.
Exclusions
Settings → Exclusions:
- IP addresses: an address (
203.0.113.7,2001:db8::1) or a range (203.0.113.0/24,2001:db8:1::/48). The page shows your current address with Exclude my IP. On IPv6, your device can change its address inside its network, so the page also offers Exclude this /64. - Paths and hostnames: see above.
- Countries: new visits from the country are not recorded. Turn on Also hide past data to leave the country out of every report too: totals, charts, breakdowns, people, live, insights, emails, widgets and the API. Nothing is deleted, so removing the country brings its history back. Imported Plausible history loses the country where the import has countries: the totals and the country card. Imported page, source and device rows have no country split, so they keep it. Payments still count in revenue totals, because the money came in.
Exclusions with an agent or the API
Ask your coding agent
Paste this into Claude Code, Codex or Cursor in your project folder. It holds no key: the agent gets one with the CLI, and you approve the sign-in in the browser. To do it yourself, follow the steps after it.
Add and remove single entries with POST /api/v1/sites/{siteId}/exclusions (scope write:config) or the MCP tool update_exclusions. The checks are the same as in Settings: an IP entry that is not an address or a CIDR range is a 400 invalid_ip, a country is an ISO code or an English name, and a country in hidden_countries is excluded too. A repeat changes nothing; send an Idempotency-Key header to retry safely. data.change_note says what changed, or is null when nothing changed.
curl -sS -X POST "https://twelvebit.app/api/v1/sites/example.com/exclusions" -H "Authorization: Bearer $TWELVEBIT_API_KEY" \
-H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{"add": {"ips": ["203.0.113.0/24"], "hostnames": ["staging.example.com"]}, "remove": {"countries": ["DE"]}}'GET /api/v1/sites/{siteId}/exclusions returns the five lists. To replace a whole list, send excluded_ips, excluded_paths, excluded_hostnames, excluded_countries or hidden_countries to PATCH /api/v1/sites/{siteId} or update_site_settings. In MCP, adding hidden_countries needs confirm: true, because it changes every report.
Attack mode
Attack mode filters spam during a bot attack. Turn it on in Settings → Exclusions, or with attack_mode in the REST API and MCP (write:config). While it is on:
- A visit counts only after a person interacts: a click, scroll, pointer move, touch or key press. The script marks every hit after the first interaction. Until then the visit is held back: it is stored, but no report shows it. The next marked hit of the session (at the latest, the ping when the tab closes) lets it count. Visits with no interaction stay out, so real visitors who leave without touching the page are not counted either. App SDK visits (
app://) are not held back. - Rate limits: at most 30 hits a minute from one address (one IPv6 /64), and 150 a minute from one network (IPv4 /24, IPv6 /48). Without attack mode there is no limit.
- Referrer spam: hits from known referrer spam domains are dropped.
- Browser headers: hits with neither
Accept-LanguagenorSec-Fetch-Modeare dropped. Every current browser sends at least one of them; scripts and simple bots often send neither.
The app gets no network-owner (ASN) data, so data-centre traffic is caught by the network rate limit, not by the name of the hosting company. Rate limits count per server instance, and the dropped-hit counts on the Overview are close, not exact.
Turn on automatically on a traffic spike: every hour, the spike check compares the last 24 hours with the usual day (the 14 days before). More than twice the usual, on a site with at least 20 visitors on a usual day, turns attack mode on. The check also counts held-back visits and dropped page views, so it sees the attack and not only what got through. Attack mode that the check turned on turns itself off when it has been on for 24 hours and the last 24 hours were normal. After you turn it off yourself, the check waits 24 hours before it turns it on again. The owner gets an email at each automatic change, and the Overview shows "Attack mode on since …" while it is on.
Local development
twelvebit does not track local development, by design. The script does not send on localhost, 127.*, [::1], *.local or *.test, and the server accepts events only from the site's domain, its subdomains and its extra domains. Check a new setup on the production domain. Coding agents: do not set up local tracking unless the person asks for it.
Only for a local test that someone asked for: data-allow-localhost="true" makes the script send, and the server must accept the local host: turn on "Allow every domain" in Settings → General → Other domains. Turn both off after the test.
Do Not Track and Global Privacy Control
The script does not read the Do Not Track or Global Privacy Control signals. If your policy respects them, load the script only when they are off:
<script>
if (navigator.doNotTrack !== "1" && !navigator.globalPrivacyControl) {
var s = document.createElement("script");
s.defer = true;
s.src = "https://twelvebit.app/js/script.js";
s.setAttribute("data-website-id", "tb_YOUR_SITE_ID");
s.setAttribute("data-domain", "example.com");
document.head.appendChild(s);
}
</script>Consent
Whether you need consent depends on the laws that apply to you and on how you use the data. In cookie mode the script stores an identifier on the device for up to one year. In the EU and the UK, storing identifiers on a device usually needs consent unless an exemption applies. Cookieless mode stores nothing on the device. If you are not sure, ask a lawyer. This page is a description of the product, not legal advice.