Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Matomo Analytics as a built-in plugin option #1052

Open
punksinatra opened this issue Mar 16, 2022 · 0 comments
Open

Include Matomo Analytics as a built-in plugin option #1052

punksinatra opened this issue Mar 16, 2022 · 0 comments
Labels
feature:extension Feature request that affects widgets, comment, share, search, and plugins.

Comments

@punksinatra
Copy link

punksinatra commented Mar 16, 2022

Make sure you go through the Hexo docs, Icarus user manual, and GitHub issues to see if the feature you are requesting has been already addressed by others.

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Possibility to include matomo analytics as a built-in feature

A clear and concise description of what you want to happen.
having the javascript calls for matomo included within the theme just like for google analytics.

A clear and concise description of any alternative solutions or features you've considered.
This theme changjinglu has it implemented.

Add any other context or screenshots about the feature request here.
more info for matomo here

Sample javascript that needs to be included to each page for the tracking to work

<!-- Matomo -->
<script>
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//domain.tld/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '1']);
    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 -->
@ppoffice ppoffice added the feature:extension Feature request that affects widgets, comment, share, search, and plugins. label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:extension Feature request that affects widgets, comment, share, search, and plugins.
Projects
None yet
Development

No branches or pull requests

2 participants