-
- 24,544 Posts
It's actually fairly complicated. AFAIK, the HitsPage snippet doesn't store any information other than the total number of hits for each page. That would make it literally impossible to use it to do what you want, since there's no historical data. You also won't be able to do it without any PHP code.
In order to do what you ultimately want, you'd have to store the hits value for every week and/or month for every portfolio page. Probably the best way to do this is with a custom script triggered once per week or month by a cron job. The snippet would collect all the current data and save it to a new line in a file or to a new record in the DB.
Then, a custom snippet on the summary page could access that data, do the calculations, and display whatever you want to site visitors.
This should be done first, because in many ways it's simpler than the "since last login" report, and because once it works, it's possible to go from there to the "since last login" report. It's very easy to get the user's "last login" date when they log in, and it shouldn't be too difficult to calculate and display whatever you want based on the difference between the stored values near the time of the last login, and the current values.
Maybe someone else can suggest a simpler way to do this.