MediaWiki & AdSense
I know I should be in bed, but I just made a change to my MediaWiki install which is very important. See, it’s my understanding that Google doesn’t like it very much if you are displaying AdSense ads on non-content pages.
Since MediaWiki has lots of these which I regularly use, I don’t want to upset Google by inadvertently serving myself a bunch of ads which are on these non-content pages.
The solution? Easy. Just don’t show ads on pages for users who are logged in. Since I’m using MediaWiki as a CMS, I’m the only person who will ever be logged in. So, to solve my problem, I wrapped the includes for the ad files in this:
<?php if($this->data['loggedin']!=1) { ?>
...
<?php } ?>
I know this is really basic, but I imagine others may want to know about it, so I’m documenting it here.