Add plausible
This commit is contained in:
parent
a6ec5b9e55
commit
eb807a63a6
7 changed files with 61 additions and 19 deletions
|
|
@ -56,19 +56,7 @@
|
|||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/load.js"></script>
|
||||
<script src="js/fizika.js"></script>
|
||||
<script
|
||||
defer
|
||||
data-domain="fizika.schmelczer.dev"
|
||||
data-api="https://stats.schmelczer.dev/status"
|
||||
src="https://stats.schmelczer.dev/js/script.file-downloads.hash.outbound-links.js"
|
||||
></script>
|
||||
<script>
|
||||
window.plausible =
|
||||
window.plausible ||
|
||||
function () {
|
||||
(window.plausible.q = window.plausible.q || []).push(arguments);
|
||||
};
|
||||
</script>
|
||||
<script type="module" src="js/stat.js"></script>
|
||||
</head>
|
||||
<body onresize="aspect()">
|
||||
<div id="titlebox">
|
||||
|
|
|
|||
2
frontend/js/plausible.js
Normal file
2
frontend/js/plausible.js
Normal file
File diff suppressed because one or more lines are too long
10
frontend/js/stats.js
Normal file
10
frontend/js/stats.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { init } from "./plausible.js";
|
||||
|
||||
init({
|
||||
domain: "fizika.schmelczer.dev",
|
||||
endpoint: "https://stats.schmelczer.dev/status",
|
||||
autoCapturePageviews: true,
|
||||
outboundLinks: true,
|
||||
fileDownloads: true,
|
||||
hashBasedRouting: true,
|
||||
});
|
||||
22
frontend/package-lock.json
generated
Normal file
22
frontend/package-lock.json
generated
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "fizika-frontend",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "fizika-frontend",
|
||||
"version": "1.0.0",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@plausible-analytics/tracker": "^0.4.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@plausible-analytics/tracker": {
|
||||
"version": "0.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@plausible-analytics/tracker/-/tracker-0.4.5.tgz",
|
||||
"integrity": "sha512-6BfAGejXY+YA3Cw6LYT2Zpn4hTxDtPQAawFsYUsQCOg78wIS5C4deAGXTfJffa5VleMWITv5lpJ/EYuQBl1tPA==",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
||||
13
frontend/package.json
Normal file
13
frontend/package.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "fizika-frontend",
|
||||
"version": "1.0.0",
|
||||
"description": "Static frontend for the Fizika practice app",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"vendor": "cp node_modules/@plausible-analytics/tracker/plausible.js js/plausible.js",
|
||||
"postinstall": "npm run vendor"
|
||||
},
|
||||
"dependencies": {
|
||||
"@plausible-analytics/tracker": "^0.4.5"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue