Skip to main content
Notra loads the OneDollarStats script on every live page and allows the OneDollarStats hosts in the CSP. It passes every option you set in blog.json to the script as a data-* attribute, so you can add custom properties or proxy the script and events through your own domain without writing a custom script. With the c15t cookie banner on, OneDollarStats loads through c15t instead, only after a visitor allows the measurement category, and keeps every option below.
1

Add your domain to OneDollarStats

In OneDollarStats, add the domain your visitors use, like blog.acme.com. OneDollarStats has no site ID or API key and assigns events to a site by its domain.
2

Add it to Notra

Open Studio → Sites, select your site, open Integrations and click Add OneDollarStats. Enter the same domain under Domain without https://. When you click Save, Notra opens a pull request with the change. To configure it in your repository instead, add it to blog.json:
blog.json
3

Merge and verify

After you merge the change and the production deployment finishes, visit your live site in a normal browser window and check the dashboard in OneDollarStats. The script ignores visits from headless and automated browsers, so a page loaded by a testing tool never shows up.

Options

The dashboard covers the domain. You set every other option in blog.json, and editing the integration in the dashboard keeps those options as they are. Notra adds the origin of scriptUrl to script-src and the origin of collectorUrl to connect-src in the Content-Security-Policy. The script sends most events as an image request and falls back to sendBeacon when that fails. OneDollarStats reports the path of each page but drops the query string, except for the utm_campaign, utm_source, utm_medium, utm_term and utm_content parameters, which it reports as campaign data.

Custom events

To track clicks in your own components and MDX, add data-s-event to a link or button. OneDollarStats then sends an event with that name when a visitor clicks it and reads properties from data-s-event-props as name=value pairs separated by ;:
From a custom script, call window.stonks.event("Pricing clicked", { placement: "changelog-footer" }). To add properties to the page view of a single page, add a data-s-view-props attribute to any element on it.

Privacy

OneDollarStats sets no cookies and stores nothing in the browser, so it has no opt-out key. It skips visits from bots, headless browsers and automation tools.
Last modified on November 8, 2026