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) { %> <% 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']);