Skip to content

Commit 364c77e

Browse files
authored
DOC Use Scientific Python Plausible instance for stable doc analytics (#26160)
1 parent 9aaed49 commit 364c77e

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@
171171
# further. For a list of options available for each theme, see the
172172
# documentation.
173173
html_theme_options = {
174-
"google_analytics": True,
174+
"legacy_google_analytics": True,
175+
"analytics": True,
175176
"mathjax_path": mathjax_path,
176177
"link_to_live_contributing_page": not parsed_version.is_devrelease,
177178
}

doc/themes/scikit-learn-modern/javascript.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% if theme_google_analytics|tobool %}
1+
{% if theme_legacy_google_analytics|tobool %}
22
<script>
33
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
44
ga('create', 'UA-22606712-2', 'auto');
@@ -8,6 +8,11 @@
88
<script async src='https://www.google-analytics.com/analytics.js'></script>
99
{% endif %}
1010

11+
{% if theme_analytics|tobool %}
12+
<script defer data-domain="scikit-learn.org" src="https://views.scientific-python.org/js/script.js">
13+
</script>
14+
{% endif %}
15+
1116
<script>
1217
$(document).ready(function() {
1318
/* Add a [>>>] button on the top-right corner of code samples to hide

doc/themes/scikit-learn-modern/theme.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pygments_style = default
44
stylesheet = css/theme.css
55

66
[options]
7-
google_analytics = true
7+
legacy_google_analytics = true
8+
analytics = true
89
link_to_live_contributing_page = false
910
mathjax_path =

0 commit comments

Comments
 (0)