-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate Google Analytics to Matomo from the ASF #576
Conversation
Signed-off-by: Ross Turk <ross@rossturk.com>
Signed-off-by: Ross Turk <ross@rossturk.com>
Signed-off-by: Ross Turk <ross@rossturk.com>
You might have beaten me @rossturk in "the biggest change size" :D I usually get up to 3M lines of code change when I release providers but this one is way bigger (see the number of files at the top) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks @rossturk
I reviewed first two commits - they look good.
Then I prepared this file:
- <script type="application/javascript">
- var doNotTrack = false;
- window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
- ga('create', 'UA-140539454-1', 'auto');
- ga('send', 'pageview');
- </script>
- <script async src='https://www.google-analytics.com/analytics.js'></script>
+<!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ _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', '13']);
+ 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);
+ })();
And run this command on the last commit:
git diff -U0 HEAD^ | grep '^[+-]' | grep -vF -f /tmp/file.txt
This yielded no results.
This means that the only changes in the commit are those line replacing GA wth Matomo.
UPDATE: found a bug - running it again
OK. This works :) (and this time I tested if it actually works by removing some lines from the pattern file).
The pattern file:
|
Can you double-check that it works please @rossturk once the site is "built" ? |
@potiuk absolutely - I'll watch for it 👍 |
Built! |
The docs look good to me. But I seem to have missed something on the landing-pages. The GA script is still there, but without the correct I will look into it and do a bit more local testing, then submit another PR in a short while 👍 |
Better before 2.3.0 release :D or next provider's release :) |
And HUUUGE thanks for it ! You wrote on the devlist it was a fun task, I hope it is :) |
Hello! This replaces the Google Analytics tracking tag in the airflow.apache.org website with a Matomo one from the ASF. I propose this because the ASF has recently updated its privacy policy, which now prohibits use of Google Analytics.
There are three changes in this PR:
docs-archive
content (about 80k pages!)For #3, I used this script:
https://gist.github.com/rossturk/1223ae5d57fbcbb4bc32da0d49137ef2