Skip to content

Blog

Piwik for Web Analytics

Google Analytics is almost ubiquitous as the solution for collecting useful information about how your website is being used by visitors. It is a good product, and has evolved over the years to be very flexible indeed.

But since it first launched, my opinions of Google have certainly changed, as have many others. Without wishing to get into a debate on the subject, there definitely is a market for a competitor to this very useful tool that might free us of that reliance on Google infrastructure, and be more respecting of our visitors, by means of initatives like Do Not Track.

Piwik screenshot

Piwik’s desktop and mobile views

I recently deployed Piwik, an open source PHP-based application intended to replace Google Analytics. A full disclosure — it will not be as full-featured as Google Analytics for those people using the full power of that solution, but it puts the power and control back in your hands. Moreover, it uses a very similar-looking (perhaps even largely compatible) JavaScript API, meaning I had to do little work to figure out how to track the events that I wanted.

With built-in support for avoiding the use of cookies altogether, you can sidestep the well-meaning, but ridiculously ill-conceived EU Cookie law and its onerous “we use cookies!” notifications entirely, while still delivering enough tracking capability for many simpler analytics applications where detailed insights into repeat visits aren’t so important.

I haven’t made the time to replace Google Analytics on this site with it yet, but that is on my list of things to do! Right now, I have some custom code server-side that detects your Do Not Track status and suppresses the Google Analytics JavaScript entirely, but Piwik would do away with that need for complexity.

It might not do enough for your application — but as a way to put your money where your mouth is and genuinely support the user’s right to give and withdraw consent for tracking, it is most definitely worth a look.

Installing PHP 5.5 on CentOS 6 using IUS Repositories

I have been inspired once again to fire up my screencasting rig, to show you how to install PHP 5.5 on CentOS 6 using Rackspace’s IUS Community Repositories.

More and more web applications now are likely to require versions of PHP beyond 5.3. CentOS 6 users are stuck with 5.3, with backported security updates, unless they diverge from standard repositories or compile PHP themselves! Until CentOS 7 is with us, those of us trying to run a rock-solid web server on CentOS will be left out in the cold running recent web applications like Moodle 2.7 which require a newer PHP.

In this video, I show you how to use the IUS repositories to get PHP 5.5 running. These repositories, with their Rackspace backing, seem likely to be nice and stable going forward.

As always, I’d love any feedback you might have.

How to install Cacti on CentOS 6

It has been far too long since a video tutorial made its debut here, so I would like to introduce a new tutorial!

Cacti is a great graphing and monitoring tool, but I have struggled in the past with getting it installed, and getting it to do what I want. It can be a little bit complex and fiddly, but recently I have had more success and am putting it to good use measuring and graphing more things.

In this tutorial, I will walk you through installing Cacti on a basic CentOS 6 system with Apache, PHP and MySQL already installed. By the end of the video, it is collecting information for the default graphs in the default installation.

I hope to extend this video series soon with some details about the additional graphs I have recently succeeded at getting installed.

As always, your comments and feedback are appreciated!

Cleaning up the IP.Board url4short mess

XDebug to the rescue…

The condensed, I-just-want-to-fix-my-site version:

On your server, try:

grep ‐ri \$mds /wherever/your/website/folder/is

to locate the injected code, and while file it resides in. You can then go into that file and remove it.

Also try re-caching all the skins and languages in the Admin Control Panel. Make sure all IP.Board updates and patches are applied to prevent the compromise happening again.

Reset your passwords and keys. Take measures to detect and continue detecting other infiltrations.

My friend Niall Brady dropped me an email, saying that some of the users of his Windows-Noob forums were reporting getting redirected to a spammy-looking site (url4short dot info) when clicking on search results to the site.

The forums run the Invision Power Board (IP.Board) software. There had been some reports of vBulletin boards being hit with this kind of spammy redirect, but fewer suggestions that this was an IPB problem. There had been a patch for a critical IPB issue released in December, but that had, obviously, been applied to the site as part of normal good practice.

Nevertheless, I was concerned. Clicking on a search engine result should definitely not be redirect somewhere other than the result page!

Without evidence that the issue was not limited to one machine, or one connection, however, it could not be ruled out that it was just malware on that visitor’s machine.

» Read the rest of this post…

Announcing Total Slider

Total Slider icon

I’m really pleased to announce that the WordPress plugin I have been working on with Van Patten Media, Total Slider, has now been released!

Total Slider is a plugin for WordPress from Van Patten Media that will transform your experience with sliders forever. Build your own templates in PHP and CSS, then preview the output in a beautiful WYSIWYG interface designed to blend seamlessly with the WordPress core.

Total Slider is released under the GNU GPL version 2 or later. We’d love your feedback, ideas, bug reports, translations and more.

Here is a quick 2-minute video introduction:

You can find out more at TotalSlider.com, and download Total Slider from the WordPress plugin directory.

SleekTabs 0.2.1 – Bugfix Release

I have just released SleekTabs 0.2.1.

Nothing too exciting, unfortunately, just a bugfix release for a bug which would cause the ajax URLs of a tab not to work if they contained an extra ‘/’ character. This bug was a problem with a regular expression used to append a timestamp variable to the ajax URL (which itself is a fix for a bug with IE caching).

As always, you can download the script from the SleekTabs project page or from its home on PHP Classes.

New SleekTabs Text Tutorial

SleekTabs still often has a bit of a learning curve to implement for many people. It is a bit, well, quirky, in the way that it has to be implemented. It could be better.

I have previously put together a video tutorial explaining with a good example how to implement it, but there has still been confusion, partly due to the old example/tutorial that ships with the download.

I’ve now put together a text version of the video tutorial (just Part 1 for now), which is easier to consume than the video if you’re pressed for time or just want to quickly look up a detail.

I’m also considering removing the old example file as part of the SleekTabs download, to avoid future confusion. The problem stems from the fact that implementation is approached two different ways across the old and new examples.

I am concerned, though, that because it is a much simpler example, removing it could be a problem for those who want to get up and running as quickly as possible, without digesting the more detailed tutorial.

I welcome all comments on SleekTabs and the documentation, so if you have ideas on how to make things better, or want to feedback things that you think are working well, please do let me know!

WPGet 0.8 Released

I’ve just pushed out a new version of WPGet, to fix an issue with its category support that has been there for quite some time.

For those not in the know, WPGet is a script that is designed to allow you to include a short summary of your recent blog posts on your website. Specifically, it works with WordPress and is great for integrating a WordPress blog into a site that isn’t completely powered by the WP platform.

The new version of WPGet brings the following to the table:

  • The ability to retrieve posts only from specific categories that you choose is now fixed*, and works with WordPress 2.3.x, 2.5 and higher.
  • The ability to retrieve posts that match certain tags. This is an all-new feature.
  • Support for WordPress version prior to 2.3 is dropped. It might still work (except Categories and Tags), but I can’t help you if it doesn’t.

If you’re not using the Category and/or Tag features, there’s probably not a compelling reason to upgrade, but if you do want to include a summary of blog posts from a certain category (or categories) or that match certain tags, WPGet can now do that for you.

* WordPress 2.3’s new database structure for categories and tags is what broke WPGet in the first place. I’ve been slow in releasing a fix, I know.

How do I get it?

The easy way: Run the installer and it will walk you through the process. There’s more help here as well if you need it.

The not-so-easy way: Download the code yourself, and run the installer on your own server (or just set it up manually).

The WPGet section of the documentation wiki is alive again and should be featuring some more documentation pretty soon.

If you have any feedback or comments, please do leave a comment on this post, or you can get in contact another way. I would love to hear from anyone successfully using WPGet!

New SleekTabs Video Tutorials

It’s been a while since I last did a video tutorial explaining how to use SleekTabs, so I thought I would dig up the project again and try to explain how to use it a little better.

The result has been my day’s work today. It’s a two part tutorial, showing you how to first set up a simple three-tabbed static web page with Ajax support, and then moving on into part two to show you how to configure fallback support (something that I never touched on previously).

Part 1

Part 2

More info about this tutorial, including the source files for this demo project, and a link to a live working completed version, is available on my documentation wiki.

I am aware that the audio quality is far from good – there is quite bad noise on the audio track and some obvious audio transitions that I really could have done better. However, I still think it’s a good resource for explaining SleekTabs and I’d love to hear any further feedback on either this or the program itself.

Learning Django

I’ve been a developer in PHP for quite some time now. I don’t honestly remember when it was that I first got a working WAMP setup, which kickstarted my interest in web applications with PHP, but I certainly remember how rewarding it was to finally get it up and running and be able to start with PHP.

Since then, I’ve embarked on a fair few projects in the language, and it has served me well for a lot that I’ve done with it.

I think the time has come, though, to expand my web application and programming horizons and look at something else.

I meant to blog about quite a long time ago, but I’m now investing time into learning Django (and therefore Python as I go along).

I bought Sams Teach Yourself Django to give me some direction in my learning of the framework. From what I’ve gone through (up to Hour 10 out of 24), I’m finding it a very useful tool to help me have a project in which to learn. I might follow up with a more in-depth review of it (either here, or on FOSSwire) if I think it worthy, once I’m done with it.

Sams Teach Yourself Django

I’m also liking Django. While it lends itself more to larger projects than to small one-time scripts, it is an impressive framework on top of Python that automates lots of the things that you have to micro-manage in PHP.

Having said this, my ventures into the realm of Django and Python do not mean I’m abandoning PHP. Just as I’ve done with running Mac OS X alongside Linux without abandoning Linux, Django will become an addition to my repetoire, not a replacement for PHP. As always, it will be about the right tool for the job.