SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict JamieJelly's Avatar
    Join Date
    Jan 2004
    Location
    London
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    creating a heatmap

    I've been thinking of an interesting project for learning javascript better, and decided I would have a go at creating a heatmap to show visitor activity on a site.

    I have already written something which works out the percentage share of each link, but now I want to create something similar to that of the crazy egg heat map.

    I just need a couple of starting pointers...
    to work out where a user clicks on a site, regardless of whether it is a link or not, i.e they click on a pic thinking it is a link or something, do I need to use coordinates?

    Also, does anyone have any pointers on how to create the infrared style imagemap overlay?

    thanks
    International calls from the UK
    Cheap International Calls

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heatmaps are too variable to be able to work properly. When you get the coordinates, you'll end up getting the coordanites for the USER'S browser width height, which can never be guaranteed to be consistant. So your data will be invalid from the start.

  3. #3
    SitePoint Enthusiast toytron's Avatar
    Join Date
    Nov 2006
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    to start, you could use the js file from theire site.
    At the bottom you could add your parameters and send them to a php file on your site.
    expl. mytracker.php + x= 10, y=100, url="theurlimtracking"

    You could then put this data in a mysql database

    With a sqlquery you could then find how many people clicked at location x/y and decide on that information what colorcode the location should get.

    for example 3 peeps clicked at loc 10,20 => so for example that spot should be blue.

    With php's GD module you could then create a png file and set each loc/pixel with the correct color value.

    For display you need for example an iframe with the sorce set to the page that you are tracking and a div with the png file that u made with GD.
    With css place the div over the iframe and set the transparancy property of the png file (different for moz and IE)


    Hope this gets you going I'm working on something like this myself. (mysql database could be slower than the sollutions out there, I think they use the logfile)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •