From 72b9b7fbea1b3f8b4c805d7989db22abe72e331e Mon Sep 17 00:00:00 2001 From: hyperdefined Date: Tue, 16 Apr 2024 16:45:42 -0400 Subject: [PATCH] feat: add umami support --- src/front/cobalt.js | 3 ++- src/localization/languages/en.json | 3 ++- src/localization/languages/ru.json | 3 ++- src/modules/pageRender/page.js | 22 +++++++++++++++++++++- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/front/cobalt.js b/src/front/cobalt.js index ad2e9e59..c30a82c0 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -29,7 +29,8 @@ const checkboxes = [ "disableAnimations", "disableMetadata", "twitterGif", - "plausible_ignore" + "plausible_ignore", + "umami.disabled" ]; const exceptions = { // used for mobile devices "vQuality": "720" diff --git a/src/localization/languages/en.json b/src/localization/languages/en.json index 546c2841..9c030e8c 100644 --- a/src/localization/languages/en.json +++ b/src/localization/languages/en.json @@ -158,6 +158,7 @@ "PrivateAnalytics": "private analytics", "SettingsDisableAnalytics": "opt out of private analytics", "SettingsAnalyticsExplanation": "enable if you don't want to be included in anonymous traffic stats. read more about this in about > privacy policy (tl;dr: nothing about you is ever stored or tracked, no cookies are used).", - "AnalyticsDescription": "cobalt uses a self-hosted plausible instance to get an approximate number of how many people use it.\n\nplausible is fully compliant with GDPR, CCPA and PECR, doesn't use cookies, and never stores any identifiable info, not even your ip address.\n\nall data is aggregated and never personalized. nothing about what you download is ever saved anywhere. it's used just for anonymous traffic stats, nothing more.\n\nplausible is fully open source, just like cobalt, and if you want to learn more about it, you can do so here. if you wish to opt out of traffic stats, you can do it in settings > other." + "AnalyticsDescriptionPlausible": "cobalt uses a self-hosted plausible instance to get an approximate number of how many people use it.\n\nplausible is fully compliant with GDPR, CCPA and PECR, doesn't use cookies, and never stores any identifiable info, not even your ip address.\n\nall data is aggregated and never personalized. nothing about what you download is ever saved anywhere. it's used just for anonymous traffic stats, nothing more.\n\nplausible is fully open source, just like cobalt, and if you want to learn more about it, you can do so here. if you wish to opt out of traffic stats, you can do it in settings > other.", + "AnalyticsDescriptionUmami": "cobalt uses a self-hosted umami instance to get an approximate number of how many people use it.\n\numami is fully compliant with GDPR and CCPA, doesn't use cookies, and never stores any identifiable info, not even your ip address.\n\nall data is aggregated and never personalized. nothing about what you download is ever saved anywhere. it's used just for anonymous traffic stats, nothing more.\n\numami is fully open source, just like cobalt, and if you want to learn more about it, you can do so here. if you wish to opt out of traffic stats, you can do it in settings > other." } } diff --git a/src/localization/languages/ru.json b/src/localization/languages/ru.json index 8f66b5b0..44991026 100644 --- a/src/localization/languages/ru.json +++ b/src/localization/languages/ru.json @@ -160,6 +160,7 @@ "PrivateAnalytics": "приватная аналитика", "SettingsDisableAnalytics": "отключить приватную аналитику", "SettingsAnalyticsExplanation": "включи, если не хочешь быть частью анонимной статистики трафика. подробнее об этом можно прочитать в политике конфиденциальности (tl;dr: ничего о тебе или твоих действиях не хранится и не отслеживается, даже куки нет).", - "AnalyticsDescription": "кобальт использует собственный инстанс plausible чтобы иметь приблизительное представление о том, сколько людей им пользуются.\n\nplausible полностью соответствует GDPR, CCPA и PECR, не использует куки и никогда не хранит никакой идентифицируемой информации, даже ip-адрес.\n\nвсе данные агрегируются и никогда не персонализируются. ничего о том, что ты скачиваешь, никогда не сохраняется. это просто анонимная статистика трафика, ничего больше.\n\nplausible также как и кобальт имеет открытый исходный код, и, если ты хочешь узнать о нём больше, то это можно сделать здесь. а если же ты хочешь исключить себя из статистики, то это можно сделать в настройках > другое." + "AnalyticsDescription": "кобальт использует собственный инстанс plausible чтобы иметь приблизительное представление о том, сколько людей им пользуются.\n\nplausible полностью соответствует GDPR, CCPA и PECR, не использует куки и никогда не хранит никакой идентифицируемой информации, даже ip-адрес.\n\nвсе данные агрегируются и никогда не персонализируются. ничего о том, что ты скачиваешь, никогда не сохраняется. это просто анонимная статистика трафика, ничего больше.\n\nplausible также как и кобальт имеет открытый исходный код, и, если ты хочешь узнать о нём больше, то это можно сделать здесь. а если же ты хочешь исключить себя из статистики, то это можно сделать в настройках > другое.", + "AnalyticsDescriptionUmami": "cobalt uses a self-hosted umami instance to get an approximate number of how many people use it.\n\numami is fully compliant with GDPR and CCPA, doesn't use cookies, and never stores any identifiable info, not even your ip address.\n\nall data is aggregated and never personalized. nothing about what you download is ever saved anywhere. it's used just for anonymous traffic stats, nothing more.\n\numami is fully open source, just like cobalt, and if you want to learn more about it, you can do so here. if you wish to opt out of traffic stats, you can do it in settings > other." } } diff --git a/src/modules/pageRender/page.js b/src/modules/pageRender/page.js index 58bb3a97..b9d7c7e5 100644 --- a/src/modules/pageRender/page.js +++ b/src/modules/pageRender/page.js @@ -82,6 +82,13 @@ export default function(obj) { src="https://${process.env.PLAUSIBLE_HOSTNAME}/js/script.js" >` : ''} + ${process.env.UMAMI_HOSTNAME && process.env.UMAMI_WEBSITE_ID ? + `` + : ''}