-2

For one url, I want to how to detect how many times this url has been viewed? I'm not familiar for what the keyword to use for my ideas.

I'm using django to find a solution,have nothing to django?

dkjf
  • 59
  • 8
  • For too broad question: Every time when user request a particular view store the `IP` in some history table (A generic model would be needed here) and then increment the `view` counter (an integer field) in model by one. If user request the same URL again check if IP exists, if exists skip incrementing. You also might want to purge the IP table once a day depending upon the traffic of your site. – Aamir Rind Dec 30 '13 at 13:02

3 Answers3

0

Put a hit counter on it, or use Google Analytics

volume one
  • 6,800
  • 13
  • 67
  • 146
0

You can develop a middleware which will save every visit on your website at each request or use a third-app system like Google Analytics.

  1. Track the number of "page views" or "hits" of an object?
  2. http://www.google.com/analytics/
Community
  • 1
  • 1
Maxime Lorant
  • 34,607
  • 19
  • 87
  • 97
0

I would suggest using 3rd party services like Google Analytics to track your website's traffic.

rav
  • 743
  • 6
  • 14