From 5138aa59443d98e39e8307663c84642efab8fa93 Mon Sep 17 00:00:00 2001 From: insectengine Date: Fri, 4 Aug 2023 14:49:11 -0500 Subject: [PATCH] chore(analytics): add matomo analytics to prod builds (#136) --- _includes/rh-analytics-head.html | 2 ++ assets/javascript/tracking.js | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 assets/javascript/tracking.js diff --git a/_includes/rh-analytics-head.html b/_includes/rh-analytics-head.html index 5ebaeb95..32f4f0b9 100644 --- a/_includes/rh-analytics-head.html +++ b/_includes/rh-analytics-head.html @@ -3,4 +3,6 @@ {% endif %} {% if jekyll.environment == "production" %} + + {% endif %} diff --git a/assets/javascript/tracking.js b/assets/javascript/tracking.js new file mode 100644 index 00000000..427343c9 --- /dev/null +++ b/assets/javascript/tracking.js @@ -0,0 +1,8 @@ +var idSite = 6; +var matomoTrackingApiUrl = 'https://analytics.ossupstream.org/matomo.php'; + +var _paq = window._paq = window._paq || []; +_paq.push(['setTrackerUrl', matomoTrackingApiUrl]); +_paq.push(['setSiteId', idSite]); +_paq.push(['trackPageView']); +_paq.push(['enableLinkTracking']); \ No newline at end of file