Skip to content

Commit 3a9eab3

Browse files
authored
Add analytics block on PyIceberg website (#2587)
<!-- Thanks for opening a pull request! --> <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. --> Closes #2559 # Rationale for this change This adds the same Matomo script tag found in the Iceberg website to our Python documentation website. ## Are these changes tested? <img width="1670" height="620" alt="Screenshot 2025-10-06 at 3 53 49 PM" src="https://github.com/user-attachments/assets/18b33bdb-0046-4c11-88da-a006246fab5f" /> Script tag found when served locally. ## Are there any user-facing changes? <!-- In the case of user-facing changes, please add the changelog label. -->
1 parent ebe0a3c commit 3a9eab3

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

dev/.rat-excludes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ build
44
.git
55
.gitignore
66
poetry.lock
7+
mkdocs/*

mkdocs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ plugins:
3535

3636
theme:
3737
name: material
38+
custom_dir: overrides
3839
logo: assets/images/iceberg-logo-icon.png
3940
favicon: assets/images/iceberg-logo-icon.png
4041
font:

mkdocs/overrides/main.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% extends "base.html" %}
2+
3+
{% block extrahead %}
4+
{{ super() }}
5+
<!-- Matomo -->
6+
<script>
7+
var _paq = window._paq = window._paq || [];
8+
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
9+
_paq.push(["setDoNotTrack", true]);
10+
_paq.push(["disableCookies"]);
11+
_paq.push(['trackPageView']);
12+
_paq.push(['enableLinkTracking']);
13+
(function() {
14+
var u="https://analytics.apache.org/";
15+
_paq.push(['setTrackerUrl', u+'matomo.php']);
16+
_paq.push(['setSiteId', '82']);
17+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
18+
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
19+
})();
20+
</script>
21+
<!-- End Matomo -->
22+
{% endblock %}

0 commit comments

Comments
 (0)