Values are strings. Switches take "true" or "false".
Required
Attribute
Notes
data-site
Your site key, copied from the SDK code page in the console. Safe to publish
Pageviews
Attribute
Default
Notes
data-hash
off
Keeps the part after # and records a pageview on every hash change. For hash routing such as /#/pricing
data-exclude
empty
Paths that don't record pageviews, comma-separated. Rules with * are wildcards, others must match exactly, e.g. /admin/*,/preview. Matches the path only, not the query string
data-auto-track
on
"false" turns off all automatic collection; only your manual calls are recorded. Rarely needed
About data-auto-track="false": it also switches off time on page, outbound and download clicks, page performance and 404 tracking, and none of those can be added back by hand. To skip a few pages, use data-exclude instead.
Interactions recorded automatically
Attribute
Default
Notes
data-outbound
on
Clicks on links to other sites. "false" to turn off
data-downloads
on
Clicks on links ending in common document, archive or installer extensions
data-forms
off
"true" records form submissions — form id, name and action only, never what was typed
data-404
off
Add it only on your 404 template, to count broken links
data-vitals
on
Load performance (largest contentful paint, interaction delay, layout shift and more), sent once when the visitor leaves the first screen
data-errors
off
"true" loads the error monitor, which records JavaScript errors on the page
Privacy and environment
Attribute
Default
Notes
data-respect-dnt
respected
With Do Not Track or Global Privacy Control on, the script doesn't run. We advise against changing this
data-allow-local
off
Allows sending from localhost and other local addresses. For local testing only
data-api
automatic
Custom collection address. Without it the address is derived from the script's own domain; you rarely need it
Other feature switches
Attribute
Default
Notes
data-autocapture
follows project
"false" stops autocapture on that page. It can only switch off: if the project has autocapture disabled, "true" does nothing
data-attribution
not loaded
The attribute's presence (value may be empty) loads the source reader, used to pass a visitor's landing source into your sign-up form
data-chat
follows project
"false" keeps the live chat widget off. Analytics is unaffected
How long until changes apply
Attributes are read by the browser, so a change applies once your site is republished and visitors reload the page. If you use a CDN or caching plugin, clear it. Project rules — exclusions, sessions, the site search parameter — are read by the collector and apply as soon as you save.