Count views of document

Hi,

What I want to achieve: I have a template which shows automatically the content of one document (like an article). Now I want to count the views of the article. Is there a feature or any other possibility to count how often a document was opened?

That would be great.
Peter

You’d need to implement a counter, which can be done server side in a component. You may want to have something to detect if its a repeat visit to that page. Analytics tools are usually the way people do this, rather than implementing it in a component.

Hi and thanks for your answer.
What I want to achieve is to show the amount of views of articles in the website. So I cant realize it with a tracking tool.
So I have to realize it with a component. Where should I save the views? Due the fact that the Website is running on On Demand 1 I cannot connect an external db. Should I save the views into the articledocument? And does this solution work if multiple people are viewing the article simultaneously?

Peter

You can implement it in a component. Saving it on the document is probably a good choice for this case. You will have to consider how to handle repeat visits from the same client. Multiple views are probably not a big problem. In theory two people could be trying to view the article at the same time and have a clash with updating, so you may want to write some code to handle that. How likely that is depends on your traffic.