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
add comment

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

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

2 Answers

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

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.