mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 19:58:00 +01:00
add matomo to app.js :3
This commit is contained in:
parent
d14956fe51
commit
cfcc417fa5
1 changed files with 2 additions and 61 deletions
|
@ -1857,72 +1857,13 @@ window.addEventListener("unload", cleanup)
|
|||
<!-- BUNDLE -->
|
||||
<!-- BUNDLE -->
|
||||
<!-- BUNDLE -->
|
||||
<!-- BUNDLE --><script src="/static/app.bundle.js?version=17.12.2023&bundledate=17122023_1311" > </script><!-- BUNDLE -->
|
||||
<!-- BUNDLE --><script src="/static/app.bundle.js?version=17.12.2023&bundledate=171220423_1311" > </script><!-- BUNDLE -->
|
||||
<!-- BUNDLE -->
|
||||
<!-- BUNDLE -->
|
||||
<!-- BUNDLE -->
|
||||
|
||||
<% if(secure) { %>
|
||||
<!-- Matomo -->
|
||||
<script>
|
||||
function anondocumenttitle(message, times) {
|
||||
var hash = CryptoJS.SHA256(message);
|
||||
|
||||
return hash.toString(CryptoJS.enc.Hex);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
if (typeof Ashley === "undefined") {
|
||||
var Ashley = {};
|
||||
}
|
||||
Ashley.dntEnabled = function (dnt, ua) {
|
||||
"use strict";
|
||||
var dntStatus =
|
||||
dnt || navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
var userAgent = ua || navigator.userAgent;
|
||||
var anomalousWinVersions = [
|
||||
"Windows NT 6.1",
|
||||
"Windows NT 6.2",
|
||||
"Windows NT 6.3",
|
||||
];
|
||||
var fxMatch = userAgent.match(/Firefox\/(\d+)/);
|
||||
var ieRegEx = /MSIE|Trident/i;
|
||||
var isIE = ieRegEx.test(userAgent);
|
||||
var platform = userAgent.match(/Windows.+?(?=;)/g);
|
||||
if (isIE && typeof Array.prototype.indexOf !== "function") {
|
||||
return false;
|
||||
} else if (fxMatch && parseInt(fxMatch[1], 10) < 32) {
|
||||
dntStatus = "Unspecified";
|
||||
} else if (
|
||||
isIE &&
|
||||
platform &&
|
||||
anomalousWinVersions.indexOf(platform.toString()) !== -1
|
||||
) {
|
||||
dntStatus = "Unspecified";
|
||||
} else {
|
||||
dntStatus = { 0: "Disabled", 1: "Enabled" }[dntStatus] || "Unspecified";
|
||||
}
|
||||
return dntStatus === "Enabled" ? true : false;
|
||||
};
|
||||
// only load if DNT is not enabled
|
||||
if (Ashley && !Ashley.dntEnabled()) {
|
||||
var _paq = window._paq = window._paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(["setDocumentTitle", anondocumenttitle(document.domain, 5) + "/" + anondocumenttitle(document.title, 5)]);
|
||||
_paq.push(["setDoNotTrack", true]);
|
||||
_paq.push(["disableCookies"]);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//data.poketube.fun/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '2']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
}
|
||||
</script>
|
||||
<!-- matomo -->
|
||||
<noscript><p><img src="//data.poketube.fun/matomo.php?idsite=2&rec=1" style="border:0;" alt="" /></p></noscript>
|
||||
<!-- End Matomo Code -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue