Buried point

Embedding point
1. Overview of burying point The
so-called burying point is to embed a js script in each page in the application server so that users can automatically trigger js when they visit the page, collect user access behavior logs and submit them to the log server.
2. js scripting
pv
hits - a request is a pv - only need to record the number of visits in the log server is the value of pv, no need to obtain additional data in js
uv
number of unique visitors - the number of unique visitors in one day - independent visitor? A user is a visitor- How to identify a user- Keep a user ID in a cookie to identify the user- Get the value of this cookie after the log server receives a request If it does not appear in today's data, it means it is a If a new uv appears, it cannot be counted as a new uv - js should have a handling of this cookie.


Try to get the cookie from the browser ar_stat_uv
if (cannot get it){
//This is the user's first visit,
generate a new one The unique identifier of the user of the user
, generate a cookie named ar_stat_uv from this unique identifier, save it to the browser and specify the storage period of 10 years,
and splice this unique identifier into the submission information as part of the information submitted to the log server in the future
}else{
//This is not the first time for this user to
access the cookie. The ar_stat_uv value is the unique identifier of the user.
This unique identifier is spliced ​​into the submission information as part of the information submitted to the log server in the future
} vv


The number of independent sessions - the total number of sessions generated in one day - session - how to identify the session - keep a cookie inside the browser to save the unique identifier of the session - after the log information submitted by the user is obtained in the server, it can be distinguished by this unique identifier Find out if this is a new session and distinguish which requests are actually from the same session - js code should include such code to uniquely distinguish between different sessions by setting the identification cookie


Try to get the cookie ar_stat_ss to get the current session Number
if (cannot get){
//This is a new session
Generate a number that uniquely identifies this session
Save the session number the number of times the page is currently accessed at the current time (the first time is 0) Save it to the browser named The session-level cookie
in the ar_stat_ss cookie is spliced ​​with this session number as part of the information to be submitted to the log server in the future
}else{
Get the information in the cookie, including the session number including the last visit time including the total number of pages visited
if( Current time - time of last visit > timeout time){
//Although this cookie exists, it has expired and expired
, regenerate a session number
, re-acquire the current time
, and re- obtain the total number of page visits - the first time is 0
, and the cookie is stored as a new one The mark of the session
is spliced ​​as the information to be submitted to the log server in the future
}else{
//There is a session-related cookie and there is no timeout
Get the session number
Get the number of page visits
Get the latest
time Concatenate the session number and the number of page visits + 1 with the latest time as the information to be submitted to the log server in the future
Update the cookie The session number unchanged time becomes the current time The total number of page visits becomes the previous total number of visits + 1
}
} br Bounce rate - the ratio of the total number of sessions that bounced out of the day / the total number of sessions - the total number of sessions: get all the session numbers in a day The number obtained by deduplication is the total number of sessions in one day today - the total number of sessions that bounced out: check which one There is only one access record corresponding to the session number. The total number of such sessions is the total number of sessions that jumped out - and these two information can be calculated and obtained through the vv information and do not require the browser to provide more information . The new ip number of new ip - within one day The total number of IPs that have never appeared in history is the number of newly added IPs today - today's IP information All IP information in the history - the IP information of the accessed client is obtained from the server - the historical IP is obtained from the historical data - no need Get additional information in js newcust The number of new customers - how many uvids in a day have never appeared in history - all uvids today are deduplicated and compared with all uvids in history to check how many have never appeared in history Appeared - uvid is needed and this data is already available when calculating uv - no need to obtain additional information in js avgtime average session access duration - average access duration of all sessions within a day - session access duration: The access time of the last page of the session - the access time of the first page - the access time of the pages in the session has been obtained when calculating the vv - no need for js to provide more information avgdeep

















Session average access depth - The average access depth of all sessions within a day - Session access depth: the total number of all pages visited by a session after deduplication - All requested page addresses in each session - need to be provided through js Visited page address information


=============================================== ===
http protocol
request
request line
request header
referer
entity content response status line response header entity content URL encoding http protocol only supports iso8859-1 characters So how to handle non-iso8859-1 characters with http protocol? - URL encoding- The technique of representing non-iso8859-1 characters with iso8859-1 characters Medium  --> 0000 1111 0F 0001 1111 CD 0011 1111 3B --> %0F%CD%3B Country --> 0101 0101 2F 0001 0101 66 0100 0101 9D --> %2F%66%9D
























Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325626316&siteId=291194637