feat: Add support for umami, matamo and plausible analytics in status page#5608
Conversation
ffe03e8 to
6cd8931
Compare
6cd8931 to
afae736
Compare
|
It would be very neat if you could make the implementation a bit more generic, so that other analytics software can be used as well. Plausible, for example, uses an almost identical format for injecting your "tracker" inside a script tag. could easily be made generic imo. |
|
@NotAShelf Very nice idea, for now, I've tested my code and it fits my need to add umami tracking. I will probably open another issue and make another pr to make it more generic as the code truly is very similar to the google analytics pr I had seen.
I've found many more but these are the main ones I've found being used online. If there are any more, I invite anyone who uses them to list them in a comment so we can discuss adding them. |
CommanderStorm
left a comment
There was a problem hiding this comment.
Pretty good.
I have left a comment about the migration/db-design and one how we could declutter this part of the UI.
|
Hey, just saw your comments @CommanderStorm, I will take them into account this week hopefully, can't promise anything. |
71761e9 to
a52341b
Compare
a52341b to
e44ec55
Compare
|
@CommanderStorm I finished taking into account your remarks. I have honestly never used vue and it took me a while to get the select working, but it is tested and works as intended (automated tests and I tested it manually by connecting it to my own umami instance). |
2dd52c4 to
6bade1f
Compare
|
@CommanderStorm I finished making it generic and refactoring the code, the tests all pass, I will let you validate it whenever you feel like it. |
CommanderStorm
left a comment
There was a problem hiding this comment.
Here is my review. Took a bit longer, but hey exams..
We can merge it into V2.1, once these are adressed
1a2826c to
8f480c7
Compare
@amirparsadd It would be really valuable to have tested this once as I don't currently have the time to setup these tools myself and test that the integration works. |
Im currently not at home but I will run a test after i get home. Could you provide a list of things i have to test? |
|
Just the regular "works as expected" regarding running UK; the analytics platform you use and that they can communicate together. |
|
Hey 👋🏻, I'm testing out the Plausible integration and after a lot of trial and error I finally got it working. The terms "Analytics ID" and "Analytics Script URL" are very confusing and it took me a very long time to finally find what I actually needed to insert.
After searching through their documentation I stumbled upon the Shopify docs which showed the use of data-domain just like the current Implementation below. uptime-kuma/server/analytics/plausible-analytics.js Lines 29 to 31 in a69566d In uptime kuma I added the following data Checking in the And it finally worked 😄. Plausible is showing analytics! I think a few tweaks are needed to make the Plausible integration clearer. I understand that the URL configuration is necessary to support self-hosted instances, but requiring the full URL made it confusing with how the plausible (cloud) setup works.
And the "Analytics ID" should always be the status page domain that the user is currently visiting. Maybe this field should be hidden? |
CommanderStorm
left a comment
There was a problem hiding this comment.
I think I am going to pull this into 2.1 and let another PR deal with the UX issues that @RoyvanEmpel raised.
@RoyvanEmpel Would it be possible for you to create an issue for this?
| const refreshInterval = 30; | ||
| const theme = "dark"; | ||
| const googleAnalyticsId = "G-123"; | ||
| const umamiAnalyticsScriptUrl = "https://umami.example.com/script.js"; |
There was a problem hiding this comment.
Hey! Thanks again for the work on this PR 🙏
We’ve noticed that some of the tests introduced here are a bit brittle and occasionally fail on CI (example run linked above). Since everything else looks good, would you mind taking a look when you have a moment to see if they can be made a bit more robust?
No rush - just want to avoid future flakes for contributors and reviewers 🙂
Thanks!
https://github.com/louislam/uptime-kuma/actions/runs/20696224735/job/59411826948?pr=6577
|
@CommanderStorm Hey there, it's been quite a while, I just saw that it was merged. @RoyvanEmpel, we could probably redo it to show the terms used by each analytics platform, ie show data-domain for plausible, and maybe add either a toggle for self hosted, and if not the default script url, but we originally thought it would be better to have just one term as all the analytics tools have the same concept, an identifier for your site and a url for the analytics script if that makes sense. |
|
Hi 👋🏻, A issue has been created for the non-intuitive plausible inputs!
I suggested two possible solutions in the issue #6744, maybe there are some other solutions for the same issue? Like a small alert / tooltip with a question mark icon next to the label name could also work.
|



https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Fixes #5607
Fixes #5690
Fixes #2938
Type of change
Please delete any options that are not relevant.
Checklist
Screenshots (if any)
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.