1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 00:14:39 -05:00

add anonymous title for matomo

This commit is contained in:
Ashley 2023-11-26 09:53:09 +00:00
parent 186f2eed11
commit d3c43137f5

View file

@ -1741,10 +1741,20 @@ if (userID) {
<% if(secure) { %>
<!-- Matomo -->
<script>
function anondocumenttitle(input, times) {
let result = input;
for (let i = 0; i < times; i++) {
result = btoa(result);
}
return result;
}
</script>
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setDocumentTitle", anondocumenttitle(document.domain, 5) + "/" + anondocumenttitle(document.title, 5)]);
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);