This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 241d8d840 ORC-1840: Add `Matomo` script to support 
`https://analytics.apache.org`
241d8d840 is described below

commit 241d8d84093c3909eeae3287612a85aa3422bcee
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Tue Jan 14 08:20:05 2025 -0800

    ORC-1840: Add `Matomo` script to support `https://analytics.apache.org`
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add `Matomo` script to support ASF web traffic analytics.
    - https://analytics.apache.org
    
    ### Why are the changes needed?
    
    To collect statistics.
    
    ### How was this patch tested?
    
    Manually build the website and check headers.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #2115 from dongjoon-hyun/ORC-1840.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    (cherry picked from commit 43ebc98b0fd8653754e60e93276ad9ccc6a93c36)
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 site/_includes/top.html | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/site/_includes/top.html b/site/_includes/top.html
index 57cb89c7c..69e314548 100644
--- a/site/_includes/top.html
+++ b/site/_includes/top.html
@@ -12,4 +12,21 @@
   <script src="{{ site.baseurl }}/js/html5shiv.min.js"></script>
   <script src="{{ site.baseurl }}/js/respond.min.js"></script>
   <![endif]-->
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before 
"trackPageView" */
+    _paq.push(["setDoNotTrack", true]);
+    _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', '68']);
+      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>
+  <!-- End Matomo Code -->
 </head>

Reply via email to