Docsllms.txtSign in
View as Markdown

Reduce usage

Plans count events a month: page views plus custom goals. Pings, bot and AI crawler hits, identify calls, outbound links and payments are free. Traffic that you exclude is not stored, so it does not count. Months are calendar months in UTC. Billing is not live yet: during the beta every plan is free, and Settings → Usage shows the plan that your volume fits.

See what you use#

Settings → Usage shows the events of this month by type, the projection for the month, and the 10 paths and hostnames with the most events. The site owner also sees the total of all their sites, because plans count per account.

Agents read the same data:

Shell
curl -sS "https://twelvebit.app/api/v1/usage" -H "Authorization: Bearer $TWELVEBIT_API_KEY"

The MCP tool is get_usage. Both take month (YYYY-MM) for an earlier month.

Controls#

Use them in this order. The first two do not change the accuracy of what you keep.

ControlWhereEffect on accuracy
Exclude pathsSettings → Exclusions, or excluded_pathsNone for the pages you keep. Excluded pages are gone from every report. Do not exclude checkout or success pages: revenue attribution needs them.
Exclude hostnamesSettings → Exclusions, or excluded_hostnamesNone. Use it for staging, preview and local hosts that load the script.
Drop pingsSettings → Usage, or drop_pings: trueThe script sends one ping when a page is hidden, to measure the time on the last page. Without pings, visit durations are shorter and one-page visits show 0 seconds. Visitors, page views, bounce rate, goals and revenue do not change. Pings are free, so this cuts writes, not billable events.
Sample page viewsSettings → Usage, or pageview_sample_rate (100, 50, 25 or 10)For very high traffic only; off (100) by default. See below.

Change them through the API with PATCH /api/v1/sites/{siteId} (scope write:config) or the MCP tool update_site_settings:

Shell
curl -sS -X PATCH "https://twelvebit.app/api/v1/sites/example.com" -H "Authorization: Bearer $TWELVEBIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"excluded_paths": ["/admin/**", "/health"], "drop_pings": true}'

excluded_paths and excluded_hostnames replace the whole list, so read the current list first (GET /api/v1/sites/{siteId} or get_usage).

Sampling and accuracy#

With a sample rate of 25, twelvebit keeps the page views of 25% of visitors. The choice is fixed per visitor, so a kept visitor keeps every page and their journey stays whole. Goals, identify calls and payments are never sampled, so alerts still fire for every signup and revenue stays complete.

What this does to the numbers while sampling is on:

  • Visitors, visits and page views drop to about the share you keep. The dashboard does not scale them up: multiply by 100 / rate (4 for 25%) to estimate the full numbers. Small counts (one page, one day) get noisy.
  • Conversion rate and revenue per visitor read higher, because goals and revenue are complete but visitors are sampled. Compare them only with periods at the same rate.
  • Funnels that start with a page step undercount; funnels of goals stay exact.
  • Revenue by channel credits only the payments of kept visitors; the rest show as without a source.

Turn sampling off (100) as soon as you can. A change applies to new events only; stored data does not change.