This is an automated email from the ASF dual-hosted git repository.
srowen pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new 609306ff5da [SPARK-45286][DOCS] Add back Matomo analytics
609306ff5da is described below
commit 609306ff5daa8ff7c2212088d33c0911ad0f4989
Author: Sean Owen <[email protected]>
AuthorDate: Sun Sep 24 14:17:55 2023 -0500
[SPARK-45286][DOCS] Add back Matomo analytics
### What changes were proposed in this pull request?
Add analytics to doc pages using the ASF's Matomo service
### Why are the changes needed?
We had previously removed Google Analytics from the website and release
docs, per ASF policy: https://github.com/apache/spark/pull/36310
We just restored analytics using the ASF-hosted Matomo service on the
website:
https://github.com/apache/spark-website/commit/a1548627b48a62c2e51870d1488ca3e09397bd30
This change would put the same new tracking code back into the release
docs. It would let us see what docs and resources are most used, I suppose.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
N/A
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #43063 from srowen/SPARK-45286.
Authored-by: Sean Owen <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
(cherry picked from commit a881438114ea3e8e918d981ef89ed1ab956d6fca)
Signed-off-by: Sean Owen <[email protected]>
---
docs/_layouts/global.html | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/docs/_layouts/global.html b/docs/_layouts/global.html
index 9b7c4692461..8c4435fdf31 100755
--- a/docs/_layouts/global.html
+++ b/docs/_layouts/global.html
@@ -32,6 +32,25 @@
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<link rel="stylesheet" href="css/docsearch.css">
+ {% production %}
+ <!-- Matomo -->
+ <script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called
before "trackPageView" */
+ _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', '40']);
+ 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 -->
+ {% endproduction %}
+
</head>
<body class="global">
<!--[if lt IE 7]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]