HTML Script Tag

Detailed options and attributes for the client-side tracking script.

HTML Script Tag

The lightweight velo.js tracker works in any modern browser without external dependencies.

Standard Snippet

<script 
  defer 
  src="https://velostats.dev/velo.js" 
  data-site-key="YOUR_SITE_KEY">
</script>

Supported Script Attributes

Attribute Required Default Description
data-site-key Yes — The public identifier for your registered site.
data-api No Current script domain Custom API URL if proxying beacons through your own reverse proxy.
defer Recommended — Ensures the script does not block HTML parsing or initial paint.

Content Security Policy (CSP)

If your website uses a Content Security Policy header, add the VeloStats domain to your policy directives:

Content-Security-Policy: 
  script-src 'self' https://velostats.dev;
  connect-src 'self' https://velostats.dev;