From aa11b90624ea09925a78c2dbd00580112e81d687 Mon Sep 17 00:00:00 2001 From: Oleh Omelchenko Date: Wed, 24 Jul 2024 18:27:24 +0300 Subject: [PATCH] add matomo --- layouts/partials/extend_head.html | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/layouts/partials/extend_head.html b/layouts/partials/extend_head.html index 7ae8201..029ae66 100644 --- a/layouts/partials/extend_head.html +++ b/layouts/partials/extend_head.html @@ -1,4 +1,15 @@ - + \ No newline at end of file + var _paq = window._paq = window._paq || []; + /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + (function () { + var u = "//matomo.olehomelchenko.com/"; + _paq.push(['setTrackerUrl', u + 'matomo.php']); + _paq.push(['setSiteId', '1']); + 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); + })(); + + \ No newline at end of file