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

rohit pushed a commit to branch staging-site
in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git


The following commit(s) were added to refs/heads/staging-site by this push:
     new 7337c6188 add matomo global code as shared by Ivet/Christian(ASF-VP)
7337c6188 is described below

commit 7337c61884b3c5ecd7f35ebeb224ce2f0cf3715f
Author: Rohit Yadav <[email protected]>
AuthorDate: Thu Oct 17 13:35:14 2024 +0530

    add matomo global code as shared by Ivet/Christian(ASF-VP)
    
    For tag manager/policies:
    
https://analytics.apache.org/index.php?module=CoreHome&action=index&date=yesterday&period=day&idSite=49#?period=day&date=yesterday&category=Dashboard_Dashboard&subcategory=1
    
    Signed-off-by: Rohit Yadav <[email protected]>
---
 asf-matomo.js        | 12 ++++++++++++
 docusaurus.config.js |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/asf-matomo.js b/asf-matomo.js
new file mode 100644
index 000000000..22eb22479
--- /dev/null
+++ b/asf-matomo.js
@@ -0,0 +1,12 @@
+var _paq = window._paq = window._paq || [];
+_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', '49']);
+  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);
+})();
diff --git a/docusaurus.config.js b/docusaurus.config.js
index dea090f4c..fb35c3176 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -14,6 +14,10 @@ const config = {
   onBrokenMarkdownLinks: 'throw',
   favicon: 'img/favicon.ico',
 
+  clientModules: [
+    require.resolve('./asf-matomo.js'),
+  ],
+
   plugins: [
     [
       'docusaurus-plugin-sass',

Reply via email to