Convert KDevelop’s Source Archive to a Source Package

I use KDevelop as my main IDE, and I’m pretty satisfied. KDevelop can create a source archive of the project’s source code automatically for you, which simplifies distribution of the project. Unfortunately, the archive created isn’t ready for distribution. The user can’t just run ./configure ; make, as they need to run all the automake tools first. That’s not ideal for distribution. So you need to convert this source archive to a source package that is ready for the user to compile immediately.

Continue reading Convert KDevelop’s Source Archive to a Source Package

Tracking MediaWiki External Links Statistics Using Google Analytics

When you track MediaWiki statistics, you usually track only internal page statistics, but tracking external links that lead out of your site is not something you can ignore. Unfortunately, we probably can’t put actual tracking code in the pages linked to by our site’s external links. Fortunately, we can track the actual clicks on those links that lead out of the site, and it’s quite easy to do when tracking statistics with Google Analytics. If you don’t already use Google Analytics with your MediaWiki site, open a new account in Google Analytics and see my previous post: Track MediaWiki Statistics using Google Analytics.

Continue reading Tracking MediaWiki External Links Statistics Using Google Analytics

Track MediaWiki Statistics using Google Analytics

Google Analytics is one of the best free web-statistics services available. It’s also quite easy to use with MediaWiki. To install Google Analytics in your MediaWiki, you should put the tracking code, which is something that looks like:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct="UA-xxxx-x";
urchinTracker();
</script>

in every page, preferably just above the </body> tag. The best way to do so is to put the tracking code inside the base skin PHP file. That means that unless you changed the default skin for MediaWiki, you need to edit /wiki/skins/MonoBook.php. In this file, you will find the </body> tag towards the bottom of the file. Insert the tracking code just above it, save the file, and you’re done, as all pages will now show the script. Google Analytics will start gathering statistics usually in about 24-28 hours.

Update: If you also want to track external links to files and other websites, take a look at Tracking MediaWiki External Links Statistics Using Google Analytics.