Jump to content
  • 0
Sign in to follow this  
Guest RobJF

Common.js problem -- script missing

Question

Guest RobJF

Trying to get statistics page tracking working on a new wiki: https://cardanowiki.info

The first stats service tried (Statcounter Free) is working fine, using a script on MediaWiki:Common.js

However, we'd prefer to use a different one: Matomo (was called Piwik). There was a problem with the MW extension so we switched to the alternative method of putting a script on Common.js

But no stats are being recorded. So I look at the page source coming back to the browser and, though I can see the Statcounter script, there is no sign of the Matomo one.

I tried swapping the order of the scripts but that made no difference. Any suggestions?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Your Common.js page has syntax errors, which is why nothing is running. The Common.js page is for js only, whereas you put HTML into that page.

Share this post


Link to post
Share on other sites
  • 0
Guest RobJF

I've reduced Common.js to the bare minimum, which passes a JS validator, but the code still isn't being loaded.

(The validator complained about the <script> tags so I took them out but I've tried both with and without and neither way works.)

$wgUseSiteJS = true;

Any ideas?

Share this post


Link to post
Share on other sites
  • 0
Guest RobJF

I've now gotten around this by taking all code out of Common.js and using other methods instead.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.