This is an automated email from the ASF dual-hosted git repository. jmclean pushed a commit to branch matomo in repository https://gitbox.apache.org/repos/asf/gravitino-site.git
commit b516ac19584b5a91ecf14d508bad0ad64e2c962b Author: Justin Mclean <[email protected]> AuthorDate: Tue Aug 20 15:47:07 2024 +1000 add Matomo to get user data (as approved by ASF privacy) --- docusaurus.config.ts | 6 ++++++ static/js/matomo.js | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 9dd6c95..946feaa 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -154,6 +154,12 @@ const config: Config = { </div>`, }, } satisfies Preset.ThemeConfig, + scripts: [ + { + src: 'js/matomo.js', + async: true, + }, + ] }; export default config; diff --git a/static/js/matomo.js b/static/js/matomo.js new file mode 100644 index 0000000..7093797 --- /dev/null +++ b/static/js/matomo.js @@ -0,0 +1,11 @@ +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', '62']); + 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); +})(); \ No newline at end of file
