Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I want to log / track unique page visits to a page in a mediawiki wiki, but I can't ask the this mediawiki admin to give me the data. If this was a page on my website I would just use statcounter.com. But it is a mediawiki wikipage that I contribute to and want to get the statistics.

share|improve this question

migrated from stackoverflow.com Mar 7 '11 at 18:03

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers 3

If you're able to install extensions on the site at all then you could try the one for Google Analytics at http://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration

Otherwise, another solution might be to try a "web beacon". That's where you insert a resource from an external site into a page so you can track the hits for it when pages are requested by a browser. For example, you could add an image to a post with a URL like http://www.yourdomain.com/tracking_pixel.gif then count the requests for it. However, this depends on the setup of MediaWiki because the ability to insert external images into a page might have been disabled. You can read more about that at http://www.mediawiki.org/wiki/Manual:Linked_images

Also note that the requests for the image won't be unique so you will need to attach a cookie to it so you can identify unique users.

share|improve this answer
add comment

Another way is: Go to Special:SpecialPages of a given wiki, and check if it has Special:PopularPages; example:

If you have Special:PopularPages, then you can use that to list page views (counts); but not if it isn't enabled; example:

  • http://en.wikipedia.org/wiki/Special:PopularPages - results with
    No such special page
    You have requested a special page that is not recognized by Wikipedia. A list of all recognized special pages may be found at Special:Specialpages.
  • http://www.alsa-project.org/main/index.php/Special:PopularPages - results with
    Popular pages
    Jump to: navigation, search
    Showing below up to 50 results starting with #1.
    View (previous 50 | next 50) (20 | 50 | 100 | 250 | 500)
    Main Page‏‎ (10,849,812 views)
    Download‏‎ (1,310,228 views)
    Documentation‏‎ (428,914 views)
    SoundcardTesting‏‎ (395,408 views)
    ...
share|improve this answer
add comment

There isn't any general way to get unique visits in MediaWiki. The closest you can come is to query the API with a query like action=query&prop=info&titles=My+Page and look for the counter property in the response, but do note this isn't "unique" visits and it may be disabled on a particular installation (e.g. Wikimedia wikis disable it because it is useless with the heavy caching they do).

Your best bet is to ask the admin for statistics, or ask them to install your statcounter.com web bug or the like.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.