Configure the tracking script
Choose per-site tracker features and override supported options in the script tag.
Configure automatic tracking for one site, then use script attributes only where the page needs an override.
-
Open Settings → Tracking, choose the tracker features, then select Save tracking settings.
Setting Default Script override Track outbound links on data-outbound="false"Track file downloads on data-downloads="false"Track form submissions on data-forms="false"Track Web Vitals on data-vitals="false"Track 404 pages on data-404="false"Track hash routes off data-hash="true"Track heatmap clicks follows Collect click heatmaps data-heatmap="false" -
Add other supported options to the generated script when needed.
Attribute Purpose data-api="https://analytics.example.com/api/public/v1/events"Override the event endpoint. data-manual="true"Wait for supermetry.pageview()instead of sending automatically.data-consent="required"Queue events until supermetry.consent(true).data-before-send="filterEvent"Call a named global function before each send. data-download-ext="pdf,zip"Replace the automatic download-extension list. data-allow-localhostAllow tracking on localhost, which is otherwise skipped. data-clicks="false"Disable custom events declared on HTML elements. data-404-pageMark the current page as a 404 page. data-supermetry-event="Signup"Name an event on a clicked or submitted element. data-supermetry-prop-plan="pro"Add a property to that HTML-declared event. For example:
<script defer data-hash="true" data-consent="required" src="https://analytics.example.com/js/YOUR_SITE_ID.js"></script> -
Leave
data-sitefor the shared/js/script.jsand/js/script.full.jsassets only. Per-site generated URLs already embed the site ID. Supermetry generatesdata-profiles,data-replay, anddata-trackingfrom server policy; do not set them in the snippet.
What you should see: after the script cache refreshes, new visits follow the saved settings and any tighter snippet overrides.