mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 08:18:17 +01:00
add anonymous title for matomo
This commit is contained in:
parent
186f2eed11
commit
d3c43137f5
1 changed files with 11 additions and 1 deletions
|
@ -1741,10 +1741,20 @@ if (userID) {
|
||||||
|
|
||||||
<% if(secure) { %>
|
<% if(secure) { %>
|
||||||
<!-- Matomo -->
|
<!-- Matomo -->
|
||||||
|
<script>
|
||||||
|
function anondocumenttitle(input, times) {
|
||||||
|
let result = input;
|
||||||
|
for (let i = 0; i < times; i++) {
|
||||||
|
result = btoa(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var _paq = window._paq = window._paq || [];
|
var _paq = window._paq = window._paq || [];
|
||||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
/* 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(["setDoNotTrack", true]);
|
||||||
_paq.push(["disableCookies"]);
|
_paq.push(["disableCookies"]);
|
||||||
_paq.push(['trackPageView']);
|
_paq.push(['trackPageView']);
|
||||||
|
|
Loading…
Reference in a new issue