Developer forum

Forum » CMS - Standard features » RE: getting most viewed pages from different ranges

RE: getting most viewed pages from different ranges

Jan Sangill
Reply

Hi,

How would you go about getting a list of items(pages), sorted by most viewed within certain timeframes(1 day, 1 week, 2 weeks).

I know you can use Statv2 in DB and make a direct query. Is it the Session Timestamp You should use to determine the timeframe or?


//jan


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Jan

Yes, it is the timestamp column you should use. If you have not disabled logging to Statv2Page, you can join that table to Statv2Session and Page tables to get what you want. Be aware of performance when doing this. Consider caching the result for some time.

Votes for this answer: 1

 

You must be logged in to post in the forum