DOCUMENTATION

Nanolytica Cloud Docs

Everything you need to set up privacy-first analytics for your websites, mobile apps, smart TVs, and IoT devices.

1. Quick start

Get started in under a minute:

  1. Create an account — sign up at the registration page with an email and password. No credit card required.
  2. Add a site — click "Add site" in the dashboard. Choose Website for web properties or Native App for mobile, TV, or IoT.
  3. Install the tracker — for websites, add the script tag. For native apps, integrate the collect API. Both are shown in the Setup tab.
  4. View your data — analytics start appearing within seconds. Real-time visitor count updates live via WebSocket.

2. Web tracking

Add this script tag to every page you want to track:

<script defer src="https://cloud.nanolytica.org/nanolytica.js" data-site-id="YOUR-SITE-UUID"></script>

Replace YOUR-SITE-UUID with your site's UUID from the dashboard Setup tab.

What gets tracked

MetricDescription
Page viewsURL path of each page visited
Engagement timeActive time on page (pauses when tab is hidden or idle)
Scroll depthMaximum scroll percentage reached (0–100)
ReferrerWhere the visitor came from (cleaned domain)
Screen sizeViewport dimensions (e.g. 1920x1080)
User agentParsed into browser, OS, and device type
UTM paramsAll 5 UTM parameters from the URL (first pageview only)

SPA support

The script automatically detects single-page application navigations via the History API. Each virtual page change sends a new pageview. Duration tracking continues seamlessly across SPA transitions.

Script attributes

AttributeRequiredDescription
data-site-idYesYour site's UUID
deferRecommendedLoad script without blocking page render

3. Native app API

For mobile apps, smart TVs, IoT devices, and any platform with HTTP access, use one of the official SDKs or send events directly to the collect endpoint.

Official SDKs

HTTP API (direct)

Or send events directly from any HTTP client:

POST /api/collect Content-Type: application/json { "site_id": "YOUR-SITE-UUID", "path": "/home", "referrer": "", "user_agent": "MyApp/1.2.3 (iOS 17; iPhone)", "screen_size": "390x844", "duration_sec": 0, "scroll_depth": 0 }

Request fields

FieldTypeRequiredDescription
site_idstringYesUUID of your site
pathstringNoScreen or page path (e.g. /home, /settings). Max 2048 chars.
referrerstringNoTraffic source or referring URL. Max 2048 chars.
user_agentstringNoApp identifier (e.g. MyApp/1.2.3). Parsed for app version. Max 512 chars.
screen_sizestringNoFormat: WIDTHxHEIGHT (e.g. 390x844)
duration_secintNoEngagement time in seconds. 0 for initial pageview, updated later. Max 86400.
scroll_depthintNoMax scroll percentage (0–100)
utm_sourcestringNoCampaign source. Takes priority over referrer. Max 256 chars.
utm_mediumstringNoCampaign medium (e.g. email, cpc). Max 256 chars.
utm_campaignstringNoCampaign name. Max 256 chars.
utm_contentstringNoAd content identifier. Max 256 chars.
utm_termstringNoPaid keyword term. Max 256 chars.

Response codes

StatusMeaning
204 No ContentEvent accepted (or DNT=1 honored)
400 Bad RequestValidation error (invalid UUID, field too long, etc.)
429 Too Many RequestsPer-site rate limit exceeded

Duration updates

To track engagement time for native apps, send the initial event with duration_sec: 0, then send periodic updates with the same path and an increasing duration value. The system uses the maximum duration per visitor-path combination.

Site types

When creating a site in the dashboard, choose the platform type:

  • Website — full dashboard with Sources, Scroll Depth, and all web metrics
  • Mobile App — Pages becomes Screens, Browsers becomes App Versions
  • TV App — same as mobile, optimized labels for smart TV apps
  • IoT Device — same as mobile, for embedded devices and kiosks

Native app types hide web-only sections like Sources and Scroll Depth.

4. UTM campaign tracking

Nanolytica automatically captures all 5 standard UTM parameters from URL query strings:

ParameterExamplePurpose
utm_sourcenewsletterTraffic source (merges with referrer)
utm_mediumemailMarketing medium (email, cpc, social, etc.)
utm_campaignspring_saleCampaign name or promotion
utm_contenthero_ctaDifferentiates ad variations or links
utm_termanalytics+toolPaid search keyword

Example tagged URL

https://yoursite.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale

How it works

  • Session-level attribution — UTM parameters are captured on the first pageview only. Subsequent page navigations within the same session do not re-capture UTM data.
  • Source mergingutm_source takes priority over the document referrer. If present, it replaces the organic referrer in the Sources section.
  • Aliasesref and source are recognized as aliases for utm_source.
  • Plus decoding+ characters in UTM values are converted to spaces for readability.

Sources sub-tabs

The dashboard Sources section provides 5 sub-tabs:

  • All — combined referrer + utm_source data
  • Medium — breakdown by utm_medium
  • Campaign — breakdown by utm_campaign
  • Content — breakdown by utm_content
  • Term — breakdown by utm_term

Filtering by UTM

Use the filter bar buttons for Medium and Campaign to filter your entire dashboard by a specific UTM dimension. This lets you see exactly which pages, devices, countries, and other metrics are associated with a particular campaign.

Native app UTM

For native apps, include UTM fields directly in the collect API payload. The same session-level rule applies: send UTM parameters only on the initial event (duration_sec = 0), not on duration update pings.

5. Dashboard

The dashboard is your central view for all analytics data. It loads at /dashboard/ after signing in.

Overview

When you have multiple sites, the Overview tab shows all your sites at a glance with sparkline graphs and key metrics. Click any site to view its full dashboard.

Visitor stats

The main chart shows unique visitors, total visits, and page views over time. Select time periods from Today, Yesterday, Last 7/30/90/180/365 days, or a custom date range. All times are displayed in your browser's timezone.

Real-time visitors

A WebSocket connection pushes live visitor counts to the dashboard. The green counter updates automatically without polling or page refresh.

Dimension sections

Below the chart, the dashboard breaks down your traffic by:

  • Pages — top pages by visitors (click to see per-page breakdown)
  • Sources — referrers and UTM data with sub-tabs
  • Countries — geo distribution with flag icons
  • Browsers — Chrome, Firefox, Safari, etc. (or App Versions for native)
  • OS — operating system breakdown
  • Devices — desktop, mobile, tablet
  • Screen Sizes — viewport dimensions
  • Scroll Depth — how far visitors scroll on average

Filtering

Click any dimension value (e.g. a country name, a browser) to filter the entire dashboard by that value. Multiple filters can be combined with AND or OR logic. Active filters appear in the filter bar and can be cleared individually. See Advanced filters for operator syntax.

Bot detection

Nanolytica detects bots and crawlers using 55+ patterns (Googlebot, Bingbot, social media crawlers, monitoring tools, etc.). Bot traffic is tracked separately and shown in the Bots tab. It does not pollute your real visitor data.

Combined views

Aggregate multiple sites into one dashboard by selecting "All sites" from the site switcher. Metrics are unified across all your web and native properties.

6. Behavioral insights

The Insights tab provides advanced behavioral analytics powered by the existing visits data. No additional tracking or configuration is needed.

Journey

Visualizes the most common page-to-page transitions. Shows top entry pages (where visitors land first), top exit pages (where they leave), and the most frequent navigation paths between pages. Useful for understanding how visitors flow through your site.

Funnels

Define multi-step conversion paths to track user progression and drop-off. For example:

/pricing → /signup → /dashboard

Funnels use ClickHouse's windowFunnel engine for accurate sequential matching within a 24-hour window. Each step must be visited in order by the same visitor. Drop-off rates and conversion percentages are shown for each step.

Create and manage funnels from the Insights tab. Funnel definitions are stored per-site and persist across sessions.

Retention

A color-coded cohort grid showing what percentage of visitors return over time. Cohorts are grouped by the week or month of first visit. Each cell shows the return rate for that period.

High retention rates (darker colors) indicate strong engagement. Use this to measure the impact of content changes, campaigns, or product updates on visitor loyalty.

Sessions

Browse individual visitor sessions with page-by-page timelines. Each session shows:

  • Pages visited in order with timestamps
  • Time spent on each page
  • Scroll depth per page
  • Entry source and browser/device info

Sessions are fully anonymous — visitors are identified by hashed IP + user agent, never by personal data.

Performance

The Performance sub-tab shows Core Web Vitals data. See Core Web Vitals for full details.

7. Advanced filters

Every filterable dimension supports six comparison operators, expressed through a URL-safe prefix syntax that is fully backwards-compatible with plain exact-match filters.

OperatorURL prefixExampleMeaning
eq(none)ChromeExact match (default)
neq!!ChromeNot equal
contains~~hromeSubstring match
not_contains!~!~botDoes not contain
starts_with^^/blogPrefix match
regex/pattern//^(Chrome|Firefox)$/RE2 regular expression

Filterable dimensions

All operators work across all 11 dimensions: path, browser, os, device, referrer, screen_size, country, utm_source, utm_medium, utm_campaign, utm_content, utm_term.

AND / OR logic

By default all active filters are combined with AND logic (visitor must match every filter). Add ?match=any to the URL to switch to OR logic (visitor must match at least one filter).

URL examples

# Exact match (default)
?browser=Chrome
# Exclude Chrome
?browser=!Chrome
# Path contains /blog
?path=~%2Fblog
# Chrome or Firefox, OR logic
?browser=Chrome&browser=Firefox&match=any

8. Core Web Vitals

The Performance sub-tab under Insights shows real-user Core Web Vitals collected automatically from supporting browsers. No configuration required.

Collected metrics

MetricFull nameGoodNeeds workPoor
LCPLargest Contentful Paint< 2.5 s2.5 – 4 s> 4 s
INPInteraction to Next Paint< 200 ms200 – 500 ms> 500 ms
CLSCumulative Layout Shift< 0.10.1 – 0.25> 0.25
FCPFirst Contentful Paint< 1.8 s1.8 – 3 s> 3 s
TTFBTime to First Byte< 800 ms800 ms – 1.8 s> 1.8 s

Thresholds follow Google's official Core Web Vitals guidelines. Each metric card shows the p75 value (the 75th percentile) alongside the sample count for the selected period.

Per-page breakdown

Below the summary cards, a table lists average vitals for each page that has data. Sort by LCP, INP, or any other metric to find the slowest pages on your site.

Browser support

Vitals are collected via the PerformanceObserver API. Unsupported browsers (e.g. Firefox for INP) simply send no data for that metric — the sample count will be zero and the card is hidden. Data is sent with the existing duration ping, so no additional network requests are made.

9. Events & goals

Track conversions beyond pageviews: fire custom events from any page, optionally attach props and a numeric value, then define goals to roll them up into completion rates and revenue.

Firing custom events

The tracking snippet exposes window.Nanolytica.track():

Nanolytica.track('cta_click');Nanolytica.track('signup', { plan: 'pro', source: 'pricing-page' });Nanolytica.track('purchase', { plan: 'pro' }, { value: 49.99 });
  • Event name — max 64 chars, matches ^[a-zA-Z0-9_-]+$
  • Props — up to 10 key/value pairs; keys ≤ 64 chars, values ≤ 256 chars
  • Value — optional number; summed per goal for revenue reporting
  • Reserved prefix — names starting with nanolytica_ are reserved for the built-in auto-tracking below

Auto-tracking (outbound, downloads, 404)

Three click-and-page auto-events ship with the snippet. Opt in by adding data-* attributes to your script tag, or toggle them for each site under Setup → Auto-tracking:

<script defer src="/nanolytica.js" data-site-id="YOUR-UUID" data-track-outbound data-track-downloads data-track-404></script>
AttributeEvent firedProps
data-track-outboundnanolytica_outboundurl, host
data-track-downloadsnanolytica_file_downloadurl, ext
data-track-404nanolytica_404path, referrer

Download-matching wins over outbound-matching to avoid double counts. 404 fires when the page contains <meta name="nanolytica-404" content="1"> — add that to your 404 template and the event fires on page load.

Goals

Define goals from Insights → Goals. Two kinds:

  • Pageview — matches visitors whose visits hit a path. Match operators: eq, starts_with, contains, regex.
  • Event — matches visitors who fired a named event. Optional prop filters (eq / neq / contains) narrow the match further.

Each goal shows completions, unique visitors, conversion rate (denominator = period-filtered unique visitors), and — for events carrying a value — revenue total in the site's configured currency. Goals respect the dashboard period selector, timezone, and active filters.

Revenue currency

Each site has a display currency (default USD) set under Setup → Revenue currency. Supported: USD, EUR, GBP, JPY, CAD, AUD, TRY, INR, BRL, CHF. There is no currency conversion — values are stored as-is and assumed to be in the site's currency.

Goals on public dashboards

When public mode is enabled for a site, the Goals sub-view is read-only and visible on the public URL. Delete and "New goal" buttons are hidden; completion counts, conversion rates, and revenue totals render the same as the authenticated view.

CSV export

The dashboard CSV export gains a # Goal Completions section listing each goal with its kind, completions, unique visitors, conversion rate, and revenue column header tagged with the site currency.

10. Public dashboards

Any site can be made publicly accessible via a shareable URL. Public dashboards show the same stats, charts, dimension breakdowns, and behavioral insights as the authenticated dashboard — without requiring login.

Enabling

Toggle the "Public" switch in the site settings within the dashboard. This generates a public URL:

https://cloud.nanolytica.org/public/YOUR-SITE-UUID

What's included

  • Visitor chart with period selection
  • All dimension breakdowns (pages, sources, countries, browsers, etc.)
  • Behavioral insights (journey, retention, sessions)
  • CSV export
  • Dimension filtering

Funnels are not available on public dashboards as they require site ownership to define.

11. CSV export

Export your analytics data as CSV from the dashboard. The export button is available in the toolbar and respects your current period selection and active filters.

Included data

The CSV export contains sections for each dimension:

  • Pages (path, visitors, avg. time, avg. scroll depth)
  • Sources / Referrers (source, visitors)
  • UTM Medium, Campaign, Content, Term (when data exists)
  • Browsers, OS, Devices, Screen Sizes (name, visitors)
  • Countries (country, visitors)

The file is named with your site name and the selected date range.

12. Privacy & compliance

Nanolytica is designed to be privacy-compliant out of the box, with no configuration needed.

No cookies

Nanolytica does not set any cookies on your visitors' browsers. No localStorage, no sessionStorage, no fingerprinting. This means no cookie consent banners are needed.

IP hashing

Visitor IP addresses are hashed with a per-site daily salt before storage. The raw IP is never written to the database. The salt rotates daily, making it impossible to track individuals across days.

Do Not Track

When a visitor's browser sends the DNT: 1 header, Nanolytica responds with 204 No Content and discards the event entirely. No data is stored.

No personal data

Nanolytica never stores:

  • Names, email addresses, or account identifiers of your visitors
  • Raw IP addresses
  • Cookies or session identifiers
  • Any data that can identify an individual person

Data retention

Analytics data in ClickHouse has a 365-day TTL. Data older than one year is automatically removed by ClickHouse's TTL mechanism. No manual cleanup is needed.

Compliance

Because no personal data is collected or stored, Nanolytica is compliant with:

  • GDPR — no personal data processing, no consent required
  • CCPA — no sale or sharing of personal information
  • ePrivacy — no cookies or device storage access
  • PECR — UK cookie regulations are not triggered

Self-hosted

Nanolytica is open source (MIT license). You can run it on your own infrastructure for complete data ownership.

View on GitHub →