# Hanzo Analytics — Hanzo AI

> Precise, real-time insights into user behavior, product performance, and business outcomes, enabling you to optimize faster, smarter, and at scale.

Web analytics you host yourself

# Hanzo Analytics

Traffic, sessions and revenue for the sites you run, in a dashboard you can read without training. It is one script on the page and one database you own — no sampling, no data-processing agreement, and no export limits on your own numbers.

[Start Free Trial](#start-free-trial)[Request Demo](#request-demo)

Hanzo Analytics Dashboard

Users

127,543

+12.4% vs last week

Conversion Rate

4.87%

+0.8% vs last week

Revenue

$45,892

+15.2% vs last week

## The reports

Each one answers a question you would otherwise export a CSV to answer.

### Realtime

Who is on the site right now, which page they are on and how they got there. Useful the hour you ship something and the hour something breaks.

### Journeys

The route people actually took through the site, laid out as a tree. It rarely matches the one in the navigation, and that gap is the finding.

### Funnels, goals and retention

Define the steps and see where the drop is. Goals count the thing you care about, and retention answers the harder question of whether anyone came back.

### Events

Track a click or a signup with a name and a few properties. No schema to declare up front and nothing to migrate when you add one.

### Attribution and UTM

Which channel, campaign and referrer brought the session that converted — including the touch that started it, not only the one that closed it.

### Live User Activity

Pageviews1,240

Users876

+24.5%

00:0006:0012:0018:0024:00

## From a visit to a number

A pageview is not worth much on its own. It gets interesting once it is joined to the step someone stopped at, the campaign that sent them and the money that followed.

### Where they stop

Build the funnel from steps you already track and read the drop between them. The step with the cliff is the one worth a week of work.

Funnels and goals

### Whether they return

Retention by the week someone arrived. Growth that comes only from new visitors looks identical to growth that lasts, until you look at this.

Retention and journeys

### What it was worth

Send the order value with the event and revenue shows up beside the traffic that produced it, split by channel and campaign.

Revenue and attribution

[See what a report looks like](#learn-more)

## If you sell something

Revenue is a report here, not an integration you buy on top.

### Revenue beside the traffic

Send an amount and a currency with the event and it lands in the same reports as everything else. Totals, order values and the sessions behind them.

### Which campaign paid for itself

Attribution splits revenue across the channels and campaigns that touched the session, so spend can be argued with numbers rather than instinct.

### The checkout, step by step

Cart to payment as a funnel, with the abandonment rate per step. Add a goal for the one step you would defend in a meeting.

Commerce Dashboard

#### Sales Performance

Conversion Rate

4.78%

+0.6%

Avg. Order Value

$87.32

+2.4%

#### Product Recommendations

Premium Headphones

98%

Wireless Keyboard

85%

Smart Watch

79%

## Open Source at Our Core

Hanzo Analytics is fully open-source, fostering innovation and collaboration among thousands of global developers.

[View Docs](https://docs.hanzo.ai)[View Repository](https://github.com/hanzoai)

analytics.js

1

import { HanzoAnalytics } from &#x27;hanzo-analytics&#x27;;

2

3

// Initialize analytics with your project ID

4

const analytics = new HanzoAnalytics(&#x27;YOUR_PROJECT_ID&#x27;);

5

6

// Track page views automatically

7

analytics.trackPageViews();

8

9

// Track custom events

10

analytics.track(&#x27;button_click&#x27;, {

11

buttonId: &#x27;signup_button&#x27;,

12

page: &#x27;/home&#x27;

13

});

## A script, then an API

The tag collects pageviews on its own. Everything past that is a function call.

### What you are signing up for

- •Your database, your rowsIt runs against Postgres, MySQL or MariaDB — one you already operate. The raw events stay somewhere you can query directly.
- •Many sites, one installAdd a site, get a tracking id. Group people into teams, and share a board with someone who should not have an account.
- •Open source, MITRead it, fork it, run it on a small server for as long as you like. The hosted version exists so you do not have to.

View Documentation

API Reference

Example Projects

JavaScript

Python

API

```
// Initialize Hanzo Analytics in your app import { HanzoAnalytics } from &#x27;hanzo-analytics&#x27;; // Configure your instance const analytics = new HanzoAnalytics({ projectId: &#x27;YOUR_PROJECT_ID&#x27;, options: { autoPageviews: true, trackClicks: true, debugMode: false } }); // Track custom events analytics.track(&#x27;purchase_completed&#x27;, { productId: &#x27;prod_123&#x27;, price: 89.99, currency: &#x27;USD&#x27; }); // Identify users analytics.identify(&#x27;user_123&#x27;, { name: &#x27;Jane Smith&#x27;, email: &#x27;jane@example.com&#x27;, plan: &#x27;premium&#x27; });
```

npm install hanzo-analytics

## AI-Powered Observability & Monitoring

Proactively identify issues and opportunities with AI-powered insights and monitoring.

### Real-time anomaly detection

Automatically identify unusual patterns and potential issues before they impact your business.

### Predictive alerts and proactive monitoring

Get alerted about potential problems before they occur with AI-powered predictive monitoring.

### Deep integration with Hanzo Cloud and Base

Connect your analytics with your entire infrastructure for comprehensive visibility.

### AI Analysis in Action

#### Traffic Anomaly Detection

Anomaly Detected

Unusual traffic spike

Confidence: 98.7%

#### AI Insights

Traffic Anomaly

Unusual spike detected at 14:32 UTC

Conversion Opportunity

Checkout abandonment 23% higher on mobile

Performance Alert

API latency increased by 150ms

#### AI Recommendation

Based on the traffic pattern analysis, we recommend scaling your infrastructure in the US-West region for the next 3 hours.

Apply Recommendation

## Enterprise-Grade Security & Compliance

Secure by design, ensuring your data meets stringent compliance standards.

### Security Features

- End-to-end encryption
- Data residency controls
- Custom data retention policies
- Role-based access control
- Regular security audits
- Privacy-focused data collection
- Automated compliance monitoring

### Security and assurance

#### Continual internal audits

Report on request.

#### Data protection

EU data handling, deletion, and export on request.

#### Privacy by design

Collected because it is used, not because it can be.

#### BAA available

For healthcare workloads.

#### Data Privacy Commitment

Hanzo Analytics collects what a report uses and nothing else. You choose where the data lives, how long it is kept, and who on your team can read it, and you can export or delete it on request.

[Read our privacy policy →](https://hanzo.ai/legal/privacy)

## Powered by Community, Improved by Collaboration

Join thousands of developers building the future of analytics together.

0M+

Downloads

0K+

GitHub Stars

0+

Contributors

### Open Source

Hanzo Analytics is fully open source, with a vibrant community of developers contributing from around the world. Join us on GitHub to collaborate on the future of analytics.

GitHub Repo

### Resources

Access comprehensive documentation, tutorials, and examples to help you make the most of Hanzo Analytics.

[#### Documentation Comprehensive guides and API references](#documentation)[#### Community Forum Join discussions with developers and AI experts](#forum)[#### Examples Sample projects showcasing Hanzo Analytics](#examples)[#### Support Get help from our team and community](#support)

Browse All Resources

Open Source Revenue Sharing

### Up to 5% of compute goes back to open source

Every deployment is SBOM-verified. Contributors to Umami earn a share of compute revenue — transparent, on-chain, and customizable by the community.

[Connect & Earn](https://hanzo.ai/open-source/dividends)[Learn More](https://hanzo.ai/open-source)

## Add the script

One tag on the page and the dashboard fills in on its own. Host it yourself or let us run it — the software is the same either way.

Start Free Trial

Request Demo

### One tag

Paste it into the head of your site. Pageviews start arriving before you have decided what to name anything.

### Your data stays yours

The events live in your own Postgres, MySQL or MariaDB. Nothing is sampled, and nothing is held back from an export.

### Open source, MIT

Run it on a small server for as long as you like. The hosted version is the same code with the operations taken care of.

No credit card required. Free trial includes all premium features for 14 days.

## Get started with Analytics

[Read the docs](https://docs.hanzo.ai/docs/services/analytics)[View on GitHub](https://github.com/hanzoai)

## Open source

License: Apache-2.0[hanzoai](https://github.com/hanzoai)

## Get Analytics

Product analytics on your data

[Deploy to Cloud](https://console.hanzo.ai/deploy)
