I'm working in a case require fairy complex use of page views.
Each content object will have page view, and this should be accessed easily so that we can do various things related to it (sorted on catalog result, display, calculate popular metter ...). The closest equivalent is the youtube video's view.
I'm thinking of some possible ways to implemented this:
Use annotation storage & indexer to create portal_catalog index & metadata.
Use indexer only (either use volatile attribute or update index base on the previous index) so that we don't have to write a frequently changed data twice. Page view is only store in object brain.
Use a relational database. Then how can we make it work with portal_catalog ?
Use a wrapper layer before Plone to do analytics and get desired data through some API. This scarify flexibility but helps reduce much work on Plone side (write event subscriber, check session, cookie ...), and the performance should be better ?
Your ideas/experience on this ?
We have used an external log analyser for a client project (a large private intranet). Architecture:
Page counts are then easy, just query the database for the right UID. Ranked lists are not much harder; query the statistics, then use the UIDs to attach catalog data to the result set.
The biggest problem we face now is a lack of data warehousing know-how (turning individual access rows in the database into efficient aggregates), and we are looking into retooling this setup to use Piwik as the statistics engine instead.
We cannot use Google Analytics in this particular case, but if you do not have such a restriction, I'd certainly would advise you to look into collective.googleanalytics and see if you can make it fit your use case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With