Analysis of Visual Interest of Visitors on a Website
Hello, in this my blog post I will tell you how to analyze the interest of visitors on websites with mouse movements.
Analysis of the visitor's mouse movements and click information gives us clues about where the ads to be added to the website will be placed. By determining how much time the visitor spends on which page and in which areas, we can both add special ads to users and enable users to interact with the ads
Detecting Mouse Movements
Detecting Mouse Coordinates on Client Side and Sending to Server
Using XMLHttpRequest we can update the page based on user action.
For example, an endless stream of news. (When the user scrolls to the bottom of the page, we make a request to fetch the next article and insert the data into the page). Using XMLHttpRequest we can make both synchronous and asynchronous requests.
To briefly explain the code below, mouse coordinates are determined using document.onmousemove and if there is a new mouse coordinate detected, after making the necessary settings for XMLHttpRequest, you can set the mouse coordinates with the post request to your website as JSON format.
Registering incoming data servers by the client
On the server side, if our request from the client is a POST request, we match the content with the relevant tags and save it to the database.
Visualization of Data
View All Blog Posts
If you want to review my project on Github and want to read my article on medium. You can click the links in the below