Continuing from the above, in our data, if you want to record the user's click behavior, there are generally two ways to record it.
One way is to bury the point in the click, and add some code to the click code, such as code such as seed="submit". The tracking JS will send back a record of the data code to the data recording server when the user clicks. . Such embedding points can be placed on links generated by jumps, or on controls such as checkBOX.
The advantages of doing this are:
·The cost is relatively low. In the operation of the entire page, since the user's clicks generally do not exceed twice the page records, the amount of data transmitted is not very large.
· It can record most of the user's operation records and analyze many data problems based on the data.
· The amount of record loss is very small. Since it is a user-triggered operation, more than 99.5% of this data can be recorded.
Some problems with this solution:
· Empty clicks without buried points cannot be recorded;
· All monitored page locations need to be buried, which is a certain cost for development.
· We can only know the user’s click behavior, but we don’t know where this behavior occurred.
Another way is to use click recording, which uses triggers on the page to request information from the server every time the mouse is clicked. And placed at the current coordinates of the mouse.
The advantages of doing this are:
· There is no need to perform other processing on the page, just add the overall code.
· Detailed click behavior can be recorded. As long as the user clicks on this page, it can be recorded, even if the user clicks on the page.
Some problems with this solution:
· The cost of the page is very high, and all clicks on the page need to be monitored, which puts a lot of pressure on the page itself, and may even change the user's behavior.
· The amount of records increases, and the amount of data generated by user behavior is much larger than that in the previous solution.
· The requirements for the page code have increased. Because it is positioned according to coordinates, the positioning needs to be paid attention to.
· Data processing is extremely complex and is greatly affected by browser, screen resolution, CSS code and other issues. The analysis of this point must be combined with the browser kernel and resolution. For example, on a responsive page, you are likely to find that the user is free to click at a certain location, but in fact, under his resolution, the button is exactly at that location.
In terms of application, recording the information of the first solution is enough for analysis. The second solution is mainly used for A/B testing.
An example illustrates the difference between each method:
For example, if you analyze the refresh of the browser, clicking the refresh of the browser will generate a jump from this page to this page. Clicking a link on the page may also generate a jump from this page to this page. The refreshed page will be named after page B. Page A has a link to page B.
· In the server log records, it may be impossible to distinguish the jump from this page to this page, because there is no source page at all. The record of the connected page B may be that the link of B is clicked on the A page, first Page B appears for the first time, and then page B is refreshed. It may also be that the link to page B is clicked twice on page A.
· But after using the js or image tracking system, this kind of data can be found through the source page. If the source page is B and the current page is also B, then it can be proved that it is a jump from page B to page B itself. But whether this refresh comes from a click on the page or a refresh on the browser is unknown.
· Relying on the method of burying points, if it is a click on the page, it will go from page B to page B. There is a page click record before this record. If there is a click record, it proves that the user clicked a link on page B. If there is no such click record, it proves that the user clicked on the browser refresh.
In fact, you can do more by clicking on the record. If you can make some rules on the naming of buried points, information such as multi-window operations can be analyzed based on the buried point information.
Based on the above, if you want to monitor the security of the website, log information is enough. If you want to monitor the data of website access, you only need to monitor JS. But if you want to know the user's click behavior, you need to click on it. The location is buried.
Author: Lance
Article source: Lance's record book. Please indicate the source link when reprinting.
【Related reports】
Data Science--How does website data come from?