Skip to content
Quantalog
All docs

Script options

Every data-* attribute the tracker accepts: Do Not Track, hash routing, ignored pages, query parameters, and domain overrides.

The tracker's behaviour is controlled with data-* attributes on the script tag itself. Every option is off by default, so an existing snippet keeps working exactly as it did — add only what you need.

You don't have to write these by hand: open a site in Workspaces, expand it, and the install snippet has a matching set of controls that build the tag for you.

All options

  • data-site — your site key. The only required attribute.
  • data-dnt="on" — skip visitors whose browser sends Do Not Track.
  • data-hash="on" — treat the URL hash as the route, for hash-based routers.
  • data-ignore-pages — comma-separated path globs to never report.
  • data-allow-params — comma-separated query parameters to keep on the reported path.
  • data-domain — report a different hostname than the one being browsed.
  • data-clicks="off" — turn off click tracking.
  • data-errors="off" — turn off JavaScript error tracking.
every option set
<script async
        src="https://quantalog-be.daorbit.in/tracker.js"
        data-site="YOUR_SITE_ID"
        data-dnt="on"
        data-hash="on"
        data-ignore-pages="/admin/*,/preview"
        data-allow-params="plan,ref"
        data-domain="example.com"></script>

Do Not Track

With data-dnt="on", visitors whose browser sends a Do Not Track signal are not tracked at all — no pageview, no engagement, nothing. It is off by default because Quantalog stores no personal data either way, but sites with a stricter policy can opt in.

Hash-based routing

Some routers navigate with #/pricing rather than changing the path. Without this option every one of those routes reports the same pathname, and your whole site collapses into a single row.

what gets reported
data-hash="on"    ->  /#/pricing  becomes  /pricing
(default)         ->  /#/pricing  becomes  /

Ignoring pages

Pass path globs to leave whole sections out of your analytics. A * matches any run of characters; everything else is literal, and rules must match the full path.

matching
data-ignore-pages="/admin/*,/preview"

/admin          not ignored  (the glob needs a trailing segment)
/admin/users    ignored
/preview        ignored
/previewer      not ignored  (rules match the whole path)

Query parameters

Query strings are dropped from the reported path by default. They routinely carry personal data — emails, reset tokens, session ids — and they shatter one page into thousands of near-identical rows. Name the parameters that are actually worth keeping:

allowing specific params
data-allow-params="plan,ref"

/buy?plan=pro&email=a@b.c   ->  /buy?plan=pro
/buy?email=a@b.c            ->  /buy

Reporting as another domain

Set data-domain when a staging or preview deploy should report into the production site's numbers rather than looking like separate traffic.