Features Why us Docs Pricing Sign in

Tallytics Documentation

Everything you need to add analytics to your website. From first script tag to custom event tracking and API access.

Installation

Add Tallytics to any website with a single script tag. No build step, no npm package, no configuration files.

  1. Create an account

    Sign up at dash.tallytics.com. Email and password, no credit card.

  2. Add your website

    Click Add website in the dashboard. Enter your domain (e.g. example.com). You'll get a unique tracking ID.

  3. Paste the script tag

    Add this snippet to the <head> of every page you want to track:

    HTML
    <script defer src="https://tallycdn.com/t.js" data-site="your-site-id"></script>

    Replace your-site-id with the tracking ID from your dashboard.

  4. You're done

    Visit your site, then check the Live tab in your dashboard. You should see yourself as an active visitor within seconds.

Script size: The tracking script is under 1KB gzipped. It loads asynchronously with defer and has zero impact on page load performance.

Platform guides

See detailed platform guides for step-by-step instructions for WordPress, Next.js, Nuxt, Gatsby, Remix, Astro, SvelteKit, Hugo, Jekyll, Shopify, Squarespace, Webflow, Wix, Google Tag Manager, and static HTML.

Verify tracking

After adding the script, open your website in a browser and check the Tallytics dashboard.

Live visitors

Go to the Live tab in your dashboard. You should see at least 1 active visitor (you). The live counter updates every 15 seconds.

Check the network tab

Open your browser's DevTools (F12) → Network tab. Filter by tallycdn. You should see:

  • t.js — the tracking script (loaded once)
  • /e — a POST request for each pageview event
Not seeing data? Make sure the data-site attribute matches your site's tracking ID exactly. Check for ad blockers that might block the script.

Dashboard

Your dashboard shows everything about your website traffic at a glance. Here's what each section shows.

Overview

The main dashboard displays four key metrics for any date range:

  • Visitors — Unique visitors (based on a daily rotating hash of IP + User-Agent, no cookies)
  • Pageviews — Total page loads across all visitors
  • Bounce rate — Percentage of visitors who viewed only one page
  • Visit duration — Average time spent on your site

Each metric shows the change compared to the previous period (e.g. "Last 7 days" compares to the 7 days before that).

Date ranges

Select from preset ranges (24h, 7d, 30d, 90d) or pick a custom date range. The timeseries chart switches between hourly resolution (for ranges under 48 hours) and daily resolution automatically.

Pages

See your top pages, entry pages (where visitors land first), and exit pages (where they leave). Sorted by pageview count.

Sources

Where your traffic comes from: referrer domains and UTM parameters (source, medium, campaign, content). See which links drive the most visitors.

Locations

Visitor countries and browser languages. Countries are determined from the IP address at collection time — no personal data is stored.

Devices

Browser names, operating systems, device types (desktop/mobile/tablet), and screen size categories.

Live

Real-time view of active visitors in the last 5 minutes. Shows current pages being viewed, visitor countries, browsers, and referrers. Auto-refreshes every 15 seconds.

Sessions

Browse individual visitor sessions from the last 7 days. Each session shows the sequence of pages viewed with timestamps. Sessions are anonymous — no personal data is attached.

Custom events

Track button clicks, form submissions, signups, purchases, or any user action with custom events.

Tracking an event

Call tallytics.track() from anywhere in your JavaScript:

JavaScript
// Track a simple event
tallytics.track('signup_clicked')

// Track with custom properties
tallytics.track('purchase_completed', {
  product: 'Pro Plan',
  amount: 99,
  currency: 'EUR'
})

Example: Track a button click

HTML
<button onclick="tallytics.track('cta_clicked', {page: '/pricing'})">
  Start free trial
</button>

Example: Track a form submission

JavaScript
document.querySelector('#signup-form').addEventListener('submit', () => {
  tallytics.track('form_submitted', { form: 'signup' })
})

Viewing events

Events appear in the Events tab of your dashboard. Click any event to see:

  • Event count over time (timeseries chart)
  • Custom properties breakdown (key-value pairs)
  • Which pages triggered the event
  • Location, device, and source breakdowns
Naming tip: Use snake_case for event names. Keep them descriptive but short: signup_completed, plan_upgraded, file_downloaded.

Filters & drilldown

Click any value in the dashboard to filter by it. For example, click a country name to see only traffic from that country. Click a referrer to see only visitors from that source.

Filters stack — you can drill down to "visitors from Germany, using Firefox, referred by google.com" by clicking each value.

The Drilldown page lets you combine multiple filters and see all metrics for that segment.

Data export

Export your analytics data at any time.

  • CSV export — Add ?format=csv to any stats API endpoint to download as CSV
  • Full account export — Go to Settings → Export Data to download all your account data as JSON (account info, sites, and associated data)
  • API access — Use the API to pull data into your own tools, scripts, or dashboards

API authentication

The Tallytics API uses session-based authentication. All API requests require a valid session cookie and the X-Requested-With: XMLHttpRequest header.

Login

Request
POST /api/auth/login
Content-Type: application/json
X-Requested-With: XMLHttpRequest

{
  "email": "[email protected]",
  "password": "your-password"
}

On success, the response sets a session cookie. Include this cookie in subsequent requests.

Check session

Request
GET /api/auth/me
X-Requested-With: XMLHttpRequest

Returns your account info including email, name, plan, and site list.

Stats endpoints

All stats endpoints require site_id, start, and end query parameters. Dates use ISO 8601 format.

Example
GET /api/stats/summary?site_id=YOUR_SITE_ID&start=2026-04-01T00:00:00Z&end=2026-04-07T23:59:59Z&compare=previous
Method Endpoint Description
GET /api/stats/summary Visitors, pageviews, bounce rate, duration
GET /api/stats/timeseries Hourly or daily pageviews & visitors
GET /api/stats/pages Top pages by pageview count
GET /api/stats/entry-pages Landing pages
GET /api/stats/exit-pages Exit pages
GET /api/stats/referrers Traffic sources (referrer domains)
GET /api/stats/utm UTM parameters (add ?type=source|medium|campaign)
GET /api/stats/countries Visitor countries (ISO codes)
GET /api/stats/languages Browser languages
GET /api/stats/browsers Browser names & versions
GET /api/stats/os Operating systems
GET /api/stats/devices Device types (desktop, mobile, tablet)
GET /api/stats/live Active visitors (last 5 minutes)
GET /api/stats/sessions Visitor sessions (paginated)
GET /api/stats/events Custom events with counts
GET /api/stats/events/{name}/full Event detail with timeseries & breakdowns

Common query parameters

Parameter Type Description
site_id UUID Required. Your site's tracking ID
start ISO 8601 Required. Period start datetime
end ISO 8601 Required. Period end datetime
compare string Set to previous for period comparison
limit integer Max results (default 10, max 100)
offset integer Pagination offset
format string Set to csv for CSV download
country string Filter by country ISO code
browser string Filter by browser name
referrer string Filter by referrer domain

Site management

Method Endpoint Description
GET /api/sites List all your websites
POST /api/sites Add a website (body: {"name": "...", "domain": "..."})
DELETE /api/sites/{id} Remove a website

Script options

The tracking script supports these data-* attributes:

Attribute Required Description
data-site Yes Your site's tracking ID (UUID)
data-endpoint No Custom collection endpoint. Defaults to the script's origin + /e
data-do-not-track No Set to "true" to respect the browser's Do Not Track setting

Custom endpoint example

HTML
<script defer
  src="https://tallycdn.com/t.js"
  data-site="your-site-id"
  data-endpoint="https://collect.yourdomain.com/e"
></script>

SPA support

Tallytics automatically detects single-page application navigation. It hooks into history.pushState and history.replaceState to track page transitions without a full reload.

This works out of the box with:

  • React (React Router, Next.js)
  • Vue (Vue Router, Nuxt)
  • Svelte (SvelteKit)
  • Angular
  • Any framework that uses the History API

No extra configuration needed. Just add the script tag once and all route changes are tracked.

Privacy & GDPR

Tallytics is designed to be compliant with GDPR, CCPA, and PECR without any extra work on your part.

What we collect

  • Page URL and referrer
  • Browser viewport width
  • Browser language
  • Country (derived from IP at collection time, IP is then discarded)
  • Custom event names and properties you choose to send

What we don't collect

  • No cookies — ever
  • No fingerprinting
  • No personal data (no names, emails, or user IDs)
  • No IP addresses stored
  • No cross-site tracking
No consent banner needed. Since Tallytics doesn't use cookies or collect personal data, you don't need a cookie banner or consent popup to use it. This applies under GDPR, CCPA, and the ePrivacy Directive.

Data residency

All analytics data is processed and stored in the EU. Your data never leaves EU jurisdiction.