I have a MediaWiki installation on new hardware to replace an old public website. Occasionally someone visits the site using a dead link and gets MediaWiki's "There is currently no text in this page". I can customize the message they get, but how can I get a notification (ideally with Google Analytics custom variables) whenever this happens,
I moved my lab's website to MediaWiki (previously
), where all pages are publicly viewable, but only I can edit them.
I have a Google Analytics account for the site, working seamlessly per these instructions
. The problem is that I'll occasionally see someone hit the site using an old link, because the MediaWiki page that they enter on is called /~oldlabmember/info.html
. I know they're seeing MediaWiki's "There is currently no text in this page." error and getting confused. (Big surprise that there's no page with that name!) I'd like to see when and where this happens so I can put up a redirect on pages where it occurs more than once.
) is blocked by MediaWiki as a security risk (and rightly so).
I can put the script in Mediawiki:Missing_Page.js or something, but I can't figure out how to only call that when a user hits a "There is currently no text..." page (i.e., not calling Missing_Page.js in Common.js on every single page load).
How do I get around this? An invisible pixel tracking system would work, but I'd really rather not sign up for another analytics account that uses 1x1 gifs for tracking. Moving over ALL the old files from the previous server is even less appealing (especially since I've already moved some into more logical locations on the new server).