Acquisition
| Name | Visits | Share | Change |
|---|---|---|---|
| 2,331 | +12.4% | ||
| direct | 1,140 | +4.1% | |
| pinterest.com | 596 | +31.8% | |
| facebook.com | 371 | -6.2% | |
| bing.com | 169 | +2.9% | |
| duckduckgo.com | 84 | 0.0% |
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 to use until 11 April 2027 23:59:59, at any amount of traffic. After 11 April 2027 it stays €0 for low-traffic sites.
If you share more than one separate note, do the last step of your option on each of them.
You paste your StatJolt code exactly as you got it. This option needs Trilium 0.99.2 or newer.
<div> and a <script>. Keep both.#shareHiddenFromTree. Your visitors then won't see this note in the menu.#shareHtmlLocation=body:end.#shareHtmlLocation=content:end. The badge then shows under the note text.~shareHtml(inheritable)=@. Start to type "StatJolt" and pick the note from the list. Every page under this note now gets the code.You can also add the code as a script. Use this option only if you can't use Option 1.
Make a new note under your shared note. Give it a name, for example "StatJolt JS".
Click Note type. Go to the Code section and choose JavaScript (Trilium frontend).
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);
In Owned Attributes of this note, type #shareHiddenFromTree. Your visitors then won't see this note in the menu.
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.
Open your public share link in a private window. You see the StatJolt badge on the page. Visit a few pages. Refresh your StatJolt dashboard and see your first visitor without waiting for the data.
Work through these steps in order.
1. Check your Trilium version. Option 1 needs Trilium 0.99.2 or newer. Older versions ignore ~shareHtml without any error.
2. Restart your Trilium server. Use the command that matches your install.
Docker Compose. Run this in the folder that has your docker-compose.yml:
docker compose restart
Plain Docker. First find the container name:
docker ps
Then restart it, using the name from the list:
docker restart <container-name>
Installed as a service (systemd). Use your service name, for example:
sudo systemctl restart trilium
3. Clear the Cloudflare cache, if your domain uses Cloudflare.
If you run another cache on your server, for example nginx caching, clear that one too.
4. Check the page again. Open one of your shared pages in a private window. You see the StatJolt badge on the page.
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.
| Name | Visits | Share | Change |
|---|---|---|---|
| 2,331 | +12.4% | ||
| direct | 1,140 | +4.1% | |
| pinterest.com | 596 | +31.8% | |
| facebook.com | 371 | -6.2% | |
| bing.com | 169 | +2.9% | |
| duckduckgo.com | 84 | 0.0% |
| Name | Visits | Share | Change |
|---|---|---|---|
| / | 2,732 | +9.7% | |
| /recipes | 1,495 | +18.2% | |
| /blog/starter-care | 1,167 | +6.4% | |
| /blog/sourdough-starter | 1,020 | +44.1% | |
| /recipes/bread | 787 | -2.3% | |
| /recipes/pizza-dough | 545 | +7.8% |
StatJolt covers the basics on Trilium: visitors, sources, pages and devices.
Plus! Included too:
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.
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.
Every shared page under the note that has the relation.
Trilium 0.99.2 or newer for Option 1. Older versions ignore ~shareHtml without any error.
No. StatJolt sets no cookies. It collects no personal data.
No. The script is small. It never blocks the page from loading.
Just paste the code and see how much clearer it gets. No cookies, no consent tool. €0 until 11 April 2027, at any traffic level. Later, for small sites it still costs €0.
Get my free account