Adding a Heat Map to WordPress

ClickHeat Screenshot

Wanting to learn a bit more about the visitors to this site, I thought installing a heat map on the site would be a good start.

I initially used PicNet Mouse Eye Tracking – this is free, but an advert for the service appears at the foot of your site. However, I soon came across the OpenSource ClickHeat. You can use this on any kind of site and is a PHP-based installation.

After much gnashing of teeth, here’s how I got it installed…

  • Download the latest version of ClickHeat and unzip it
  • Install this into a folder on your server
  • Now, from the address bar of your browser, open up the folder. e.g. If you installed it to, you’d go to this directory in your address bar.
  • This will start the installer. I found errors straight away – make sure the config, log and cache folders are writeable.
  • Done. You simply need to add the code to start tracking – return to the ClickHeat folder to access your heat map and make settings changes.

To test it’s working, simply append ?debugclickheat to the end of any of your sites URLs.

I added the JavaScript (which is generated from the ClickHeat admin screen) directly to my footer.php file in the theme folder, wrapping it in a check to ensure that an admin isn’t signed in (so it doesn’t track my clicking!).

One more problem I cam across – in the ClickHeat admin screens I kept getting the following error…

Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in /xxx/clickheat/index.php  on line 51

Obviously, I’ve replaced the directory path with “xxx” for security reasons.

After some searching around, I decided the best solution was to make a modification to the ClickHeat code itself. Open up the index.php file within the ClickHeat folder and attempt to find the line that starts with the following…

if (@ini_get('zlib.output_compression')

Before this line, add the following…


And that’s worked for me.

I’ll report back on how I get on with ClickHeat.

4 replies on “Adding a Heat Map to WordPress”

Hi, thanks for mentioning our plugin. We have tested it to WP 3.0 and it checked out with our development team.

There are usually three main issues people run into when installing the plugin

1. no wp_footer() added to the bottom of the theme you are using

2. the plugin is expecting the default clickheat install directory. this can be modified in the plugin file if it needs to be somewhere else.

3. try clearing your WP caching system or there may be an incompatible caching system


4. I forgot that it doesn’t suppose to track administrators – hence the reason why the script was missing from my header.


None-the-less I prefer putting the script in directly as it gives me a little more control over the results. However, I’ll update the post to reflect the fact that the plugin DOES work!

I forgot to mention that the plugin does not track admin clicks. So if you are viewing your site and logged into the WP admin area it will not show.

I would suggest give Clicktale a try. I’ve been using it for 2 months and it is neat to watch what your users do, I learned a lot.

Talk to me!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: