Skip to main content
Notra loads the DataFast script on every live page and allows DataFast in the CSP. It passes every option you set in blog.json to the tracker as a data-* attribute, so you can track visitors across your domains, send events through your own proxy and turn off payment detection without writing a custom script. With the c15t cookie banner on, DataFast loads through c15t instead, only after a visitor allows the measurement category, and keeps every option below.
1

Copy your website ID

In DataFast, open your website’s settings and find its tracking code. The website ID is the data-website-id value that starts with dfid_, and the domain is the data-domain value. The ID is public, so you don’t need an API key.
2

Add it to Notra

Open Studio → Sites, select your site, open Integrations and click Add DataFast. Paste the ID into Website ID and the domain you added in DataFast into Domain. 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 and check the realtime view in DataFast.

Options

The dashboard covers the website ID and domain. You set every other option in blog.json, and editing the integration in the dashboard keeps those options as they are. Notra always loads the script from https://datafa.st/js/script.js and adds https://datafa.st to script-src in the Content-Security-Policy. It adds the origin of apiUrl to connect-src, or https://datafa.st when you leave it out, because the tracker sends every event there. DataFast’s data-allow-file-protocol option isn’t available, because a Notra site is never opened from a local file.

Cross-domain tracking

When a visitor clicks a link to one of your allowedHostnames, DataFast adds the visitor and session IDs to the link as _df_vid, _df_sid, _df_vfs and _df_vsn query parameters. The DataFast script on the other domain reads them and removes them from the address bar, so the visit counts as one journey. Links to any other domain send an external_link event instead.

Goals and payments

To track clicks in your own components and MDX, add data-fast-goal to an element. DataFast then sends a goal with that name when a visitor clicks it and uses the element’s data-fast-goal-* attributes as properties:
data-fast-scroll works the same way and sends a goal when the element scrolls into view. data-fast-scroll-threshold sets how much of it has to be visible, from 0 to 1 with a default of 0.5, and data-fast-scroll-delay sets how many milliseconds it has to stay visible. From a custom script, call window.datafast("pricing_clicked", { placement: "changelog-footer" }) as DataFast’s goal docs describe. When a visitor lands on a page whose URL carries a Stripe session_id, a Polar checkout_id or a Lemon Squeezy order_id, DataFast records a payment for that visitor. Set disablePayments to true if those parameters mean something else on your site.

Privacy

DataFast sets first-party cookies that keep the visitor ID, the visitor’s first visit and session count for a year and the session ID for 30 minutes. To stop tracking your own visits, run localStorage.setItem("datafast_ignore", "true") in the browser console on your live site.
Last modified on November 8, 2026