Use Matomo in https://arrow.apache.org/datafusion/
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
Suggestion. If we want to analyze https://arrow.apache.org/datafusion/ , we can use Matomo provided by ASF.
https://arrow.apache.org/ uses Matome by apache/arrow-site#206, apache/arrow-site#215 and apache/arrow#13096 and we can see Matomo's dashboard for https://arrow.apache.org/ at https://analytics.apache.org/index.php?module=CoreHome&action=index&date=yesterday&period=day&idSite=20#?period=day&date=yesterday&category=Dashboard_Dashboard&subcategory=1 .
But this isn't required. If we don't need this for https://arrow.apache.org/datafusion/ , we can reject this suggestion.
**Describe the solution you'd like**
We can do it like apache/arrow#13096 :
```diff
diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html
index a9d0f30b..ceadc26b 100644
--- a/docs/source/_templates/layout.html
+++ b/docs/source/_templates/layout.html
@@ -1,5 +1,28 @@
{% extends "pydata_sphinx_theme/layout.html" %}
+{# Use Matomo #}
+{% block extrahead %}
+ {{ super() }}
+
+
+
+ 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', '20']);
+ 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);
+ })();
+
+
+{% endblock %}
+
{# Silence the navbar #}
{% block docs_navbar %}
{% endblock %}
```
**Describe alternatives you've considered**
I don't have any other idea.
**Additional context**
We must not use Google Analytics for this for becoming compliant with the GDPR (the European Union's General Data Protection Regulation):
* https://privacy.apache.org/policies/privacy-policy-public.html
* https://privacy.apache.org/faq/committers.html
If you're a PMC member, see also: https://lists.apache.org/thread/w7syx5v2kt3h7zmjqsw6hhpm6dq56bk7
Contributor guide
Research direction
Start with docs/source/_templates/layout.html and compare the proposed Matomo integration with the referenced apache/arrow#13096 change. Confirm that ASF permits tracking for the DataFusion site and that site ID 20 is appropriate; done means the generated DataFusion documentation pages include the approved privacy-preserving Matomo tracking.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100