Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Build a “click heat map” system using Ruby and JavaScript

By Peter Cooper / August 16, 2006

Heatmap

Heat maps allow you to see where people are clicking on your Web page(s) and while some pay-for, professional systems offer this feature, David Pardo has put together a guide, including Ruby and JavaScript source, of how to create your own from scratch!

Comments

  1. David Pardo says:

    Thank you so much for your kind words. It was my first ruby program, I won't pretend it's well written. :)

    Anyhow, it's not going to be the last. I liked it _so much_

  2. Jerrett says:

    The part that does the compositing of the dots on the image takes a really long time due to the memory usage of how it's all chained together on one conver command.. with an hours worth of click data, it was taking 4+ hours to run...

    so i modified the script a bit to use RMagick, and now it parses it in about 20 seconds!

    here is the modified version of the generateimages.rb script (which is all the peices of ruby in his examples put together)

    http://jerrett.net/generateimages.rb

    I wanted to keep playing and clean it up, but I had to stop to get back to other work - but for anyone running into memory and speed issues, hopefully this helps :)

  3. David Pardo says:

    I think there's some potential into creating a real open source product. Your code works flawlessly in my windows box (but for a couple of quotes) and I'll try to update my blog with it as soon as possible.

    Thanks so much.

  4. David Pardo says:

    Done! You can find it at sourceforge.net/projects/clickmaps.

    Jerret, you're invited to join!

Other Posts to Enjoy

Twitter Mentions