Heat Map on different screen resolution using jquery

荒凉一梦 提交于 2019-12-25 05:09:12

问题


I read Chris Coyier article ( http://css-tricks.com/tracking-clicks-building-a-clickmap-with-php-and-jquery/ ) . It shows how to track user clicks through out a page , save it to a database and later build a heat map out of it.

No problems with that it works fine with a fix screen resolution but the moment i resize the window if fails.

Let's say i want to track clicks for my entire website , what will happen between different screen resolutions , so let's say a user is on 1024×768 screen resolution , the other one from desktop again is on 1024×640 and one more from a mobile phone.

At last i am looking at my website report using a totally different screen resolution let's say 1280×720. Isn't it going to create a mess.

Would love to hear if there is any fix on it or not ?


回答1:


You could implement this with a particular fixed resolution (say 1024 x 768 ). If the window is resized, you would then need to recalculate the width and the height, and then try and 'scale' the clciked position back to your fixed 1024 x 768 design. This will not be 100% accurate, but it will give you decent results.



来源:https://stackoverflow.com/questions/11421566/heat-map-on-different-screen-resolution-using-jquery

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!