blog.json is passed to the tracker, so you can turn on web vitals, error tracking and custom events, skip or mask paths and tune batching without writing a custom script.
With the c15t cookie banner on, Databuddy loads through c15t instead, only after a visitor allows the measurement category, and keeps every option below.
1
Copy your Client ID
In Databuddy, open your website and copy the
data-client-id value from its tracking code. It’s a public ID, so no API key is needed.2
Add it to Notra
Open Studio → Sites, select your site, open Integrations and click Add Databuddy. Paste the ID into Client ID, switch on the tracking you want and 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 Databuddy.
Options
The dashboard covers the Client ID and the four most common tracking switches. Every other option is set inblog.json, and editing the integration in the dashboard keeps those options as they are.
Notra adds the origins of
scriptUrl and apiUrl to the Content-Security-Policy automatically.
Session replay
Withreplay on, Notra loads Databuddy’s recorder next to the tracker on every live page. Turn session replay on for your website in Databuddy as well, or no recordings are stored. Page text is masked by default and typed input is always masked, so a recording shows the layout and visitor actions without what was on screen.
blog.json
The recorder sends to the same
apiUrl as the tracker and uses your maskPatterns. Notra adds the recorder’s origin to the Content-Security-Policy and allows the blob: worker it compresses recordings in. With the c15t cookie banner on, the recorder starts only after a visitor allows measurement and stops as soon as they withdraw it.
Custom events
WithtrackAttributes on, you can track clicks in your own components or MDX without any JavaScript. Databuddy sends the data-track value as the event name and the element’s other data-* attributes as properties: