This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a commit to branch juzhiyuan-patch-1 in repository https://gitbox.apache.org/repos/asf/apisix-website.git
commit 0707c054b32528916513b5330bd1de29604a9da8 Author: 琚致远 <[email protected]> AuthorDate: Sat May 14 21:23:28 2022 +0800 support matomo from the ASF --- website/config/ssrTemplate.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/website/config/ssrTemplate.js b/website/config/ssrTemplate.js index 8d9ba56f575..07f6e3b7774 100644 --- a/website/config/ssrTemplate.js +++ b/website/config/ssrTemplate.js @@ -19,6 +19,25 @@ module.exports = { <% it.scripts.forEach((script) => { %> <link rel="preload" href="<%= it.baseUrl %><%= script %>" as="script"> <% }); %> + <!-- Matomo from the ASF --> + <script> + var _paq = window._paq = window._paq || []; + /* tracker methods like "setCustomDimension" should be called before + "trackPageView" */ + /* We explicitly disable cookie tracking to avoid privacy issues */ + _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', '17']); + 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 --> </head> <body <%~ it.bodyAttributes %>> <%~ it.preBodyTags %>
