From 419c6bd12f9cf3f4da80373fa3db313233919704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenzo=20Dellac=C3=A0?= Date: Fri, 10 Jul 2020 12:38:12 +0200 Subject: [PATCH] fixed matomo console errors --- index.html | 2 +- pages/about.html | 2 +- pages/contact.html | 2 +- pages/policy.html | 2 +- scripts/matomoData.js | 14 ++++++++++++++ 5 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 scripts/matomoData.js diff --git a/index.html b/index.html index a71c5f3..b15244f 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ crossorigin="anonymous"> Mind Overflow : Home - + diff --git a/pages/about.html b/pages/about.html index a6ef1cd..1eaa791 100644 --- a/pages/about.html +++ b/pages/about.html @@ -11,7 +11,7 @@ crossorigin="anonymous"> - + diff --git a/pages/contact.html b/pages/contact.html index 09dced3..a71239d 100644 --- a/pages/contact.html +++ b/pages/contact.html @@ -11,7 +11,7 @@ crossorigin="anonymous"> - + diff --git a/pages/policy.html b/pages/policy.html index a860f52..659e29c 100644 --- a/pages/policy.html +++ b/pages/policy.html @@ -11,7 +11,7 @@ crossorigin="anonymous"> - + diff --git a/scripts/matomoData.js b/scripts/matomoData.js new file mode 100644 index 0000000..f247edb --- /dev/null +++ b/scripts/matomoData.js @@ -0,0 +1,14 @@ +// JavaScript Document +var _paq = window._paq || []; +// require user consent before processing data +_paq.push(['requireConsent']); +/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ +_paq.push(['trackPageView']); +_paq.push(['enableLinkTracking']); +(function() { +var u="//admin.mind-overflow.net/matomo/"; +_paq.push(['setTrackerUrl', u+'matomo.php']); +_paq.push(['setSiteId', '1']); +var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; +g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); +})(); \ No newline at end of file