Source code of generating mouse move heatmap

 This software generates Mouse Move Heat Map by using recorded log at Replay visitor's actions. The implementation uses JavaConenctor and the source code's location is written at Mouse move heat map.

Location of the Source Code

 The source code of this function is in the "[ALINOUS_HOME]/admin/heatmap/" folder.

Mouse Move Heat map's source

In this page, I'll explain how to generate the heat map of mouse move. By learning this contents, you can customize the detail of generating the Mouse Move Heat Map.

Create Mouse Move Heat Map

 You can generate the heat map by pushing "Create New Heat Map" button.

Create Heatmap

Then the job to create a heat map is executed as the back ground job with progress bar. The "createHeatMap.anls" in the "new" folder is the source code.

create heat map background job

The source code is below.

 This program is doing operations below.

  • Init the raster buffer
  • Create the heat map

Initialize the raster

 The "Heatmap.initRaster()" function initialize the all pixcel's value into 0.

The "hm_raster_line" table has information about the line's pixcel value. The "line_idx" column means y coordinate, and values separated by " "(space).

This table's information is used when the heat map image generated.

Create the heat map

 The "" function calculate the value of the stayed time of visitor's mouse pointer, generate a heat map image, and save the image encoded in Base64 format into the database.

This function calls

  • Heatmap.analyzePageAccesses()
  • Heatmap.updateRasterLine()
  • Heatmap.createHeatmapImage()

The "Heatmap.analyzePageAccesses()" function is to calculate values of the raster from recorded visitor's action log. If you want to customize the formula to make heatmap value, customize inside of this function.

The "Heatmap.updateRasterLine()" is just updating the raster information after the calculation.

The "Heatmap.createHeatmapImage()" is to create image and draw the heat map using Java functions.


Go to Top