Sign in
Colour theme

Analytiics quickstart

Two minutes to a first pageview. Pick whichever of the three routes matches how your site is built.

1. The script tag

<script defer src="https://in.analytiics.co/script.js" data-site="example.com"></script>

That is the whole install. It records the initial pageview, SPA navigation through the History API, back/forward, outbound link clicks, and flushes on page hide. The snippet defaults to the hosted collector. Localhost is ignored unless you set data-dev="true" (or allowLocalhost for the module), so development traffic never lands in production data.

Serving the script from your own domain instead is one line different and can avoid script-host blocklists. The collector still defaults to https://in.analytiics.co; optionally set data-api to a first-party collector proxy:

<script defer src="/script.js" data-site="example.com" data-api="https://in.analytiics.co"></script>

2. As a module

import { init } from "@analytiics/tracker";

const analytiics = init({ site: "example.com", api: "https://in.analytiics.co" });
analytiics.track("page_published", { template: "grid" });
analytiics.identify(user.id);

3. Let the CLI do it

npx analytiics start

Signs you in with a device code, creates the project, issues a server write key and writes it to .env, scaffolds analytics.yaml, and installs the instrument agent skill. Every step is idempotent, so running it again is a status check rather than a second setup. See the CLI page.

Verify it

curl -s https://in.analytiics.co/health

Then open your site and watch the dashboard at https://www.analytiics.co/p/example.com. A live example, on real traffic, is at /p/thiings.

What comes next

  • Declare your events in analytics.yaml so they are reviewed as a diff and typed at the call site.
  • Send revenue from your backend with the Node SDK — the browser path deliberately cannot.

Last updated 2026-08-27. This page is also available as Markdown at /docs/quickstart.md, or from this URL with Accept: text/markdown.