Simple Website Analytics for Trilium

Get simple website analytics for Trilium with one snippet. It counts the visitors of your shared notes. No sampling, no delays. Just the numbers you need.

Add it once. It reaches every page under your shared note automatically.

StatJolt is 0 EUR to use until 2027, at any amount of traffic. After 2027 it stays 0 EUR for low-traffic sites.

Before you start

  1. Sign up and copy your snippet. Under a minute. No credit card.
  2. In Trilium, open the note that is the top of your public site. Turn on the Shared switch. Trilium then shows the public link. Every note under this note is shared too.

If you share more than one separate note, do the last step of your option on each of them.

Option 1: HTML snippet (easiest)

You paste your StatJolt code exactly as you got it.

  1. Make a new note under your shared note. Give it a name, for example "StatJolt".
  2. Click Note type. Go to the Code section and choose HTML.
  3. Paste your full StatJolt code into the note. It has two lines: a <div> and a <script>. Keep both.
  4. In Owned Attributes of this note, type #shareHiddenFromTree. Your visitors then won't see this note in the menu.
  5. In Owned Attributes of this note, add the label that matches your badge position. You set the position in your StatJolt account, on the Badge tab of your site settings:
    • Floating, bottom right or Floating, bottom left: type #shareHtmlLocation=body:end.
    • Next to icon row or New row, centered: type #shareHtmlLocation=content:end. The badge then shows under the note text.
  6. Open your shared top note again. In Owned Attributes, type ~shareHtml(inheritable)=@. Start to type "StatJolt" and pick the note from the list. Every page under this note now gets the code.

Option 2: JavaScript note

You can also add the code as a script. Use this option only if you can't use Option 1.

  1. Make a new note under your shared note. Give it a name, for example "StatJolt JS".

  2. Click Note type. Go to the Code section and choose JavaScript (Trilium frontend).

  3. Paste this code. Put the number from data-user="…" in your StatJolt code in place of YOUR-ID:

    var box = document.createElement('div');
    box.id = 'statjolt-badge';
    (document.getElementById('content') || document.body).appendChild(box);
    
    var s = document.createElement('script');
    s.async = true;
    s.src = 'https://statjolt.com/measure/c.min.js';
    s.setAttribute('data-user', 'YOUR-ID');
    document.head.appendChild(s);
  4. In Owned Attributes of this note, type #shareHiddenFromTree. Your visitors then won't see this note in the menu.

  5. Open your shared top note. In Owned Attributes, type ~shareJs(inheritable)=@. Start to type "StatJolt JS" and pick the note from the list.

The badge shows as you set it in your StatJolt account, on the Badge tab of your site settings. A floating badge stays in its corner. Next to icon row and New row, centered show the badge under the note text.

Check that it works

Open your public share link in a private window. Visit a few pages. Refresh your StatJolt dashboard and see your first visitor without waiting for the data.

What your dashboard looks like

Once you log in, everything is clickable. There are more tabs if you want to dig deeper. You can also click on a page to see which channels brought the most visitors there. Combine these with mobile, country or almost anything. You can easily delete any of these filters with simple close buttons on them.

yourwebsite.com Last 7 days
Unique Users 3,562 +8.2%
Pageviews 8,644 +11.4%
Sessions 4,691 +6.7%
Bounce Rate 39.8% -3.1%
Visit Duration 2:54 +19s
Conversions 139 +14.9%

Acquisition

NameVisitsShareChange
Google2,331+12.4%
direct1,140+4.1%
github.com596+31.8%
news.ycombinator.com371-6.2%
x.com169+2.9%
linkedin.com840.0%

Pages

NameVisitsShareChange
/2,732+9.7%
/pricing1,495+18.2%
/docs/quickstart1,167+6.4%
/blog/privacy-first-analytics1,020+44.1%
/features787-2.3%
/docs/api545+7.8%

Everything you need, not just the basics

StatJolt covers the basics on Trilium: visitors, sources, pages and devices.

Plus! Included too:

  • User journeys: the path a visitor takes through your notes.
  • Core Web Vitals: the same speed score Google uses to rank you. The difference is real measurement, not a simulation. It catches it if one of your pages slows down.
  • JS error tracking: catch broken code without a separate tool.
  • Funnels: free, not locked behind a paid plan.

Simple web analytics for Trilium

StatJolt is a simple web analytics tool for Trilium. The statistics are cookieless. So you don't need a cookie banner, because there is no personal data. You still get every number.

FAQ for Trilium website analytics

How do I install StatJolt on Trilium?

Paste your snippet into an HTML code note under your shared note. Then add the ~shareHtml(inheritable) relation to your shared top note and point it to that note.

Which pages does it count?

Every shared page under the note that has the relation.

Do I need a cookie banner?

No. StatJolt sets no cookies. It collects no personal data.

Does it slow my site down?

No. The script is about 17 kB. It never blocks the page from loading.

Replace GA4 in 2 minutes

Just paste the code and see how much clearer it gets. No cookies, no consent tool. 0 EUR until 2027, at any traffic level. Later, for small sites it still costs 0 EUR.

Get my free account