You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2022/03/30 08:28:31 UTC
[libcloud-site] 02/04: Replace Google Analytics with ASF hosted Matomo instance.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/libcloud-site.git
commit f86b10c8dc7da88f56e55d14a2cc80442ce18a4c
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Wed Mar 30 10:25:50 2022 +0200
Replace Google Analytics with ASF hosted Matomo instance.
---
source/_assets/js/matomo.js | 17 +++++++++++++++++
source/_includes/analytics.html | 20 +++++++++++++-------
2 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/source/_assets/js/matomo.js b/source/_assets/js/matomo.js
new file mode 100644
index 0000000..f4abea6
--- /dev/null
+++ b/source/_assets/js/matomo.js
@@ -0,0 +1,17 @@
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before
+"trackPageView" */
+ /* We explicitly disable cookie tracking to avoid privacy issues */
+ _paq.push(['disableCookies']);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '7']);
+ 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);
+ })();
+</script>
diff --git a/source/_includes/analytics.html b/source/_includes/analytics.html
index fb54e1f..627363d 100644
--- a/source/_includes/analytics.html
+++ b/source/_includes/analytics.html
@@ -1,11 +1,17 @@
<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-23580482-1']);
- _gaq.push(['_trackPageview']);
-
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before
+"trackPageView" */
+ /* We explicitly disable cookie tracking to avoid privacy issues */
+ _paq.push(['disableCookies']);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
(function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '7']);
+ 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);
})();
</script>