You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2022/04/28 01:46:16 UTC

[cordova-docs] branch master updated: switch google analytics to Matomo (#1244)

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

purplecabbage pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new b1b04fef3 switch google analytics to Matomo (#1244)
b1b04fef3 is described below

commit b1b04fef36c3ea1fc911c7d6264de40b3c977d35
Author: Jesse MacFadyen <pu...@gmail.com>
AuthorDate: Wed Apr 27 18:46:10 2022 -0700

    switch google analytics to Matomo (#1244)
---
 www/_includes/analytics.html | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/www/_includes/analytics.html b/www/_includes/analytics.html
index 4105df954..f5460c41f 100644
--- a/www/_includes/analytics.html
+++ b/www/_includes/analytics.html
@@ -1,8 +1,16 @@
+<!-- Matomo -->
 <script>
-    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-    ga('create', '{{ layout.analytics_id }}', 'auto');
-    ga('send', 'pageview');
-</script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '16']);
+      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 -->
+  


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org