Getting Started

Install the tracking script

Add the Otus tracking snippet to the head of your website to start collecting data.

Otus collects data through a single lightweight script. Add it once to every page you want to measure — the best place is inside the <head> so it loads early.

Add the snippet

Copy your snippet from Site settings → Tracking snippet and paste it just before the closing </head> tag:

index.html
<!doctype html>
<html>
  <head>
    <!-- ... your other head tags ... -->
    <script
      defer
      id="otus-script"
      data-site-id="123"
      data-endpoint="https://ingest.otusanalytics.com/e"
      src="https://cdn.otusanalytics.com/otus.js"
    ></script>
  </head>
  <body>
    <!-- ... -->
  </body>
</html>

Replace data-site-id="123" with your site ID. Everything else can stay as-is.

The script is loaded with defer and is under 5 KB, so it won't block rendering or slow your page down.

Snippet attributes

AttributeRequiredDescription
id="otus-script"YesThe tracker locates itself by this ID. Don't change it.
data-site-idYesYour numeric site ID. Without it, tracking is skipped.
data-endpointNoIngestion URL. Defaults to https://ingest.otusanalytics.com/e.
data-tracking-modeNocookieless (default) or full. See Tracking modes.

Enabling full tracking

Cookieless is the default. To enable full tracking (which unlocks returning-visitor metrics), add data-tracking-mode="full":

Full tracking
<script
  defer
  id="otus-script"
  data-site-id="123"
  data-endpoint="https://ingest.otusanalytics.com/e"
  data-tracking-mode="full"
  src="https://cdn.otusanalytics.com/otus.js"
></script>

Single-page apps (SPAs)

You don't need to do anything extra. The tracker automatically records a pageview on the initial load and on every client-side route change (pushState, replaceState, popstate and hashchange), so frameworks like Vue, React, Svelte and Angular work out of the box.

Opting yourself out

To stop the tracker recording your own visits in a browser, run this in the console once:

localStorage.setItem("otus_ignore", "true");

Next step

Once the snippet is live, verify your installation. Using a tag manager or CMS instead? See the integration guides.