catalyst / moodle-tool_webanalytics

A Moodle admin tool adding Web Analytics to your Moodle site.
https://moodle.org/plugins/tool_webanalytics
7 stars 11 forks source link

Double slash in var u #25

Closed filhocf closed 4 years ago

filhocf commented 4 years ago

I created a track in my Matomo instance and when tried to add in my moodle, I used the follow parameters: local_analytics/enable = true local_analytics/piwik = true local_analytics/siteid = 116 local_analytics/siteurl = mypiwik.com

And, when I take a look in the source code of my page, i found:

<!-- Start Piwik Code -->
--
  | <noscript>
  | <p>
  | <img src="//mypiwik.com/piwik.php?idsite=116" style="border:0;" alt="" />
  | </p>
  | </noscript>
  | <script type="text/javascript">
  | window._paq = window._paq \|\| [];
  |  
  | _paq.push(['trackPageView']);
  | _paq.push(['enableLinkTracking']);
  | _paq.push(['enableHeartBeatTimer', 30]);
  | (function() {
  | var u='//mypiwik.com/';
  | _paq.push(['setTrackerUrl', u+'piwik.php']);
  | _paq.push(['setSiteId', 116]);
  | var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
  | g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  | })();
  | </script>

Give a look in "var u". Have a double slash there. So, I can't to track my Moodle instance.

Some suggestion?

Since now, thanks in advance.

dmitriim commented 4 years ago

Hi @filhocf Thanks for reporting this. Would be useful to know what Moodle version and the plugin version you see this on?

dmitriim commented 4 years ago

Haha. Seems like you are reporting this to a different plugin :) probably you are after https://github.com/bmbrands/moodle-local_analytics

filhocf commented 4 years ago

Sorry by my mistake. My IT guy gave me your project as base but without conditions to explain the problem. So, i tried to "translate" (the problem and language) the question here.

Any way, thank you by your attention.