English 中文(简体)
What are useful parameters to store when tracking page views? [closed]
原标题:
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 9 years ago.

I want to implement a simple in-house table that tracks user page views on my website. Without targeting some specific hypothesis, what is useful data to store? Eventually I ll use it to build graphs or decision trees to better learn about our user base. This is static (no javascript).

Things I can think of:

  • URL accessed
  • HTTP refer[r]er
  • HTTP Accept Language
  • Browser-agent
  • Session id
  • User id (if logged in)
  • Time visited
最佳回答

It depends on how public your site is. If your site requires authentication you can have more controlled statistics because you can trace the user (visitors) history. In the case the user does not require authentication you are limited to the information provided by the SERVER VARIABLES: HTTP_USER_AGENT; REMOTE_USER; REMOTE_ADDR; REMOTE_HOST; REMOTE_PORT; HTTP_COOKIE; HTTP_USER_AGENT.

I have implemented something like this for some non-public site each time the user logs on to the site, the information I m storing looks like:

  • User Key
  • Remote host IP
  • Date Logon
  • Last Request Datetime
  • Total time connected (minutes)
  • Last Request Minutes
  • Event/Action performed
问题回答

Sounds like a good start,

I d be inclined to store visitor IP address, and derived from that via a geo ip lookup the location of the visitor.

Also you could consider reverse dns ing the IP to get an idea of the isp you re user is on, you might never use it but then again it could be useful if you have a report of downstream caching causing problems.





相关问题
PHP DOMDocument GetElementsByTagName Not Finding Elements

I have an HTML page containing alot of meta tags and I want to parse them to find certain ones. Here is the code I am using, but it s not picking up any of the tags. $dom = new DOMDocument(); $dom-&...

How to Add Comments to a JPEG File Using C#

Within the property window of a JPEG image, there is a tab called Summary . Within this tab, there is a field called Comments I would like to write some c# code which will add a given string to ...

Find if a column in Oracle has a sequence

I am attempting to figure out if a column in Oracle is populated from a sequence. My impression of how Oracle handles sequencing is that the sequence and column are separate entities and one needs to ...

Metadata for columns in SQLite v2.8 (PHP5)

How can I get metadata / constraints (primary key and "null allowed" in particular) for each column in a SQLite v2.8 table using PHP5 (like mysql_fetch_field for MySql)? sqlite_fetch_column_types (OO:...

热门标签