From 0a188da1923a12cc12493f29cb0ea3969175bacc Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 15 Aug 2023 23:27:47 +0100 Subject: [PATCH] docs: add umami --- docs/config.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/config.js b/docs/config.js index 4db9b27..4a214c0 100644 --- a/docs/config.js +++ b/docs/config.js @@ -47,10 +47,19 @@ docute.init({ url: 'https://aplayer.js.org' }), evanyou(), - player() + player(), + insertUmamiJS('8c8b314e-99d9-4ac4-bee9-0e9826bb2b1c', 'https://umami.diygod.dev/script.js') ] }); +function insertUmamiJS(id, url) { + var script = document.createElement('script'); + script.setAttribute("data-website-id",id); + script.src = url; + script.async = true; + document.head.appendChild(script); +} + function player () { return function (context) { context.event.on('landing:updated', function () {