How to record and collect user access data

Source: Internet
Author: User

We all want to know where they come from for each visitor to the site. See what. Interested in what. Why leave the website and so on. For each site's accurate grasp of access, you can count what the market is focusing on, what the potential users are interested in, and how we will send them the information they want and the information we want them to know. Therefore, we need to use advanced network technology, every access record is recorded and analyzed.

Traditional access statistics are not difficult to obtain the overall user's access situation. However, there is no way to know the access of an anonymous login. Because when the user closes the browser, the system cannot tell if he is the same visitor when he visits the website again. In order to solve this problem, we use the cookie technology. Because most internet visitors do not block cookies. The website can automatically generate a file within the visitor's computer via cookies to save simple information. Therefore, when the user visits the website, the system automatically checks whether the visitor's computer has the corresponding cookie file, if not, generates a permanent cookie file and a digital ID for it. If so, read its digital ID and record its access record into the database.

When the user visits the page, the system immediately writes a record in the cache, including: Digital ID/user account, Access time, source IP, access page, source page, stay time and whether to leave the site. At this time, only the dwell time of this field is empty. When the user leaves or closes the window, the other event is fired, and the system automatically calculates the time of departure, which results in the user's stay on this page. With this approach, we can easily do all kinds of statistics.

Take a page for example, we can count its daily visits, the average duration of each user's stay, and how others came to this page. If we know the source page of each page, we can do statistics to get the distribution of the page from the previous page. Thus, each page can be drawn in the order of browsing, showing the majority of the user's web browsing path.

If a user visits the page after a period of time, to register, become a user. Then the system will automatically identify and change the access records of all the digital IDs that he used to the user account. If the user starts without logging in, it will automatically change the record of all of his digital IDs in the access record to his user account at the time of landing. This will ensure that he has not registered/logged in the past when the access record can still be linked to him.

The following diagram illustrates the formation of access records:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.